Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

#1376: the Windows auto-cache floor applies to HIP builds only; CUDA on Windows keeps its sizing (no change measured there)

Niko12214895f63a6155
diff --git a/src/program/generate.cpp b/src/program/generate.cpp
index 111deb1ba..a15e70fd9 100644
--- a/src/program/generate.cpp
+++ b/src/program/generate.cpp
@@ -4192,12 +4192,14 @@ int main(int argc, char** argv) {
// windows, the prompt path) comes out of the reserve. 0.1.40 ended a 20 GB RX 7900 XT with 2,170 MiB free
// (its write-back check cut the cache); 0.1.40.2 passed that check with the default 700 MiB and ended with
// 323 MiB, where Windows paged and decode fell from 52 to 21-25 tok/s. --vram-reserve-mib 2600 fixed it. So on
- // Windows an auto cache on a card of 16 GiB or more keeps a floor of kWddmAutoReserveMib. A reserve given on the
- // command line is kept as it is; a smaller card keeps its own sizing (#496 lowers the reserve further when
- // the cache would not fit); and this is said, never silent. The cache size changes no output bit.
+ // Windows HIP an auto cache on a card of 16 GiB or more keeps a floor of kWddmAutoReserveMib. CUDA on Windows is
+ // left as it was: the same 0.1.40 / 0.1.40.2 pair on an RTX 5070 ended with the same slots and free VRAM, and a
+ // floor there would only cost 16 GB+ NVIDIA cards ~1.8 GiB of cache. A reserve given on the command line is
+ // kept as it is; a smaller card keeps its own sizing (#496 lowers the reserve further when the cache would not
+ // fit); and this is said, never silent. The cache size changes no output bit.
constexpr int kWddmAutoReserveMib = 2560;
if (!o.vram_reserve_given && o.vram_reserve_mib < kWddmAutoReserveMib) {
-#if defined(_WIN32)
+#if defined(_WIN32) && defined(STRATA_USE_HIP)
size_t fb_now = 0, tb_now = 0;
if (cudaMemGetInfo(&fb_now, &tb_now) == cudaSuccess && tb_now >= (16ull << 30)) {
std::fprintf(stderr, "strata generate: expert cache auto: Windows keeps %d MiB free after the cache on a card "