Pull requests / #1287

#1287 feat(vision): support Windows HIP image encoding

open · @Yasei-no-otoko · 0 commentaires · Sur GitHub

BenchmarksSetup & installAMD / HIPNVIDIA / CUDAModels & quantsDocumentationWindows

Description

Windows HIP users currently lack a GPU build path for the optional image encoder. This adds a separate Windows HIP build for `strata-vision` and makes an explicit `--gpu` request fail when GPU initialization or warm-up fails, instead of silently falling back to the CPU.

## Changes

- Add `STRATA_VISION_HIP`, mutually exclusive with the CUDA option.
- Add a Windows build script using ROCm Clang, Visual Studio's SDK/linker, a private ROCm environment, and explicit `GPU_TARGETS`. The caller supplies the pinned llama.cpp checkout documented in the build instructions.
- Select a concrete GPU/IGPU device, log its backend and hardware name, mask HIP devices in CPU mode, and require a successful GPU warm-up before `READY`.
- Document the complete vision configuration, matching projector downloads, and engine arguments for stock Windows HIP installations; include RX 6900 XT verification records and image fixtures.

## Validation

Tested on physical Windows 11 / RX 6900 XT (`gfx1030`), ROCm `10.2.0a20260930`, Clang 24, and llama.cpp `3cf03257f219afbe7334045ff7c6a06ac68c627d`, with the official Strata 0.1.40 language engine and Huihui Swift IQ3_XXS:

- HIP build and incremental rebuild passed.
- The batch launcher/venv block passed four real Windows `cmd.exe` checks: only `py`, only `python`, both, and neither on PATH. Available runtimes created runnable virtual environments; when neither was available, the script produced the expected error.
- CPU mode produced valid finite image embeddings; `--gpu` with no visible GPU exited with an explicit error and no `READY`.
- GPU mode identified `ROCm0 (AMD Radeon RX 6900 XT)`, completed warm-up, and produced valid finite embeddings. Loaded DLL paths and Windows GPU memory counters confirmed the deployed HIP runtime.
- Two different image fixtures were correctly recognized through Chat Completions and Responses, including shapes and printed text. Both requests used uncached image contents.
- Health, model listing, version, web root, and text chat checks passed.
- After merging `main` (`e8ca9af`), the Windows HIP Release build/link passed. The merged encoder produced 240 x 2560 finite image embeddings in CPU mode and explicitly failed without `READY` when GPU visibility was disabled. Portable-default, native-reconfiguration, and CUDA/HIP mutual-exclusion checks passed, along with 70 setup tests; the PR diff against `main` passes `git diff --check`. The GPU/API measurements above are from the pre-merge version; post-merge GPU/API inference was not repeated.

Evidence: [RX 6900 XT report](https://github.com/Yasei-no-otoko/Strata/blob/35d8c590ab2f21988c42c6dfe7d9c400b9aefc3a/bench/results/2026-10-07-windows-hip-vision-rx6900xt/README.md) and [structured results](https://github.com/Yasei-no-otoko/Strata/blob/35d8c590ab2f21988c42c6dfe7d9c400b9aefc3a/bench/results/2026-10-07-windows-hip-vision-rx6900xt/verification.json).

## Scope

This is a manual source-build path; stock setup choices and release packaging remain unchanged. Runtime validation covers one RX 6900 XT with the existing 300-image-token cap. Other GPUs, fine-detail OCR, grounding accuracy, and sustained load are not claimed as validated.

Sur le site

Liens install, modèles, releases.