Pull requests / #1792
#1792 setup: find_vcvars() without CUDA asks vswhere for no version range (#881)
closed · @Hugua700 · 0 Kommentare · Auf GitHub
Setup & installAMD / HIPNVIDIA / CUDAModels & quantsWindows
Beschreibung
#881's CPU image encoder cannot be built on a machine whose only C++ tools are Visual Studio 2026, because `find_vcvars()` returns `None` there. `[16.0,18.0)` is CUDA 13's requirement (#985), and it was applied to every caller. #985 then added `cuda_v` to relax it for CUDA 13.3+ — correct for CUDA callers, but a **non-CUDA** caller still passes no `cuda_v`, so the range still applies and VS 2026 stays invisible. `build_vision_cpu()` calls `find_vcvars()` with no arguments, so on that machine it cannot build the encoder at all. This is also a prerequisite for #1789's `--vision cpu` on Windows: that accepts a hand-built encoder, but building it still goes through `find_vcvars()`. **The change** (one function, one file): - `cuda_v is None` → ask vswhere for no version range. The CPU encoder is built by MSVC, which is happy with any version, and `tools/hip/build_windows.bat` already calls vswhere that way. - CUDA callers unchanged: `cuda_v=(13, 0)` still refuses VS 18, `cuda_v=(13, 3)` still takes it. - `STRATA_VCVARS=<vcvars64.bat>` picks an install by hand, for a vswhere that cannot be used (e.g. a range-matched install that is broken). **Measured** on the machine of #881 (RX 6800M / gfx1031, Windows 11, Chinese locale, the only C++ tools are Visual Studio 2026 Build Tools 18.4.11605): ``` find_vcvars() -> <VS 18>\VC\Auxiliary\Build\vcvars64.bat find_vcvars(cuda_v=(13, 0)) -> None find_vcvars(cuda_v=(13, 3)) -> <VS 18>\VC\Auxiliary\Build\vcvars64.bat ``` **Not included here**, deliberately: - the Windows plumbing itself (`hip_vision()`'s gate, placing the encoder beside the engine) — #1789 covers that, and covers it better; - shipping the encoder inside the ready-made zip, which would remove the toolchain requirement entirely. That is a release-policy decision: `package_windows.py` would carry a `strata-vision.exe` built with `-DSTRATA_PORTABLE=ON` (AVX2 baseline + static CRT, so it runs on other machines), the zip goes 120 → 122 MiB, `BUILD.json` records `"vision": "cpu"`, and a build without an encoder packages exactly as before. Happy to file it if wanted.
Mehr auf der Site
Links zu Install, Modellen, Releases.