diff --git a/src/program/generate.cpp b/src/program/generate.cpp index 4cd39ac5..053b9f29 100644 --- a/src/program/generate.cpp +++ b/src/program/generate.cpp @@ -2798,6 +2798,17 @@ int main(int argc, char** argv) { // So its expert arena stays unregistered. STRATA_UMA_REGISTER=1 (or STRATA_ARENA_PIN_GIB=0) registers it as before. if (strata::core::igpu_uma_arena_default(ad.gcnArchName, all_igpu, win_host)) strata::core::arena_uma_no_register_flag().store(true); + // gfx1151 on Windows (#1630 capped a bare `--prefill auto` at 6144 for a 7900 XTX's commit charge): the Strix Halo has its + // 8192 chunk back. IQ3_S, 8K prompt: 691 -> 787 tok/s (one chunk streams 1,785 experts instead of 2,782), 64K 713 -> 748; + // 4K is one chunk already. STRATA_GFX1151_CHUNK=0 (or STRATA_GFX1151_DEFAULTS=0) keeps 6144. + if (win_host && all_igpu && o.prefill_auto_bare && o.prefill_auto_cap > 0 && std::strncmp(ad.gcnArchName, "gfx1151", 7) == 0) { + const char* c1 = std::getenv("STRATA_GFX1151_CHUNK"); + const char* d1 = std::getenv("STRATA_GFX1151_DEFAULTS"); + if (!(c1 != nullptr && c1[0] == '0') && !(d1 != nullptr && d1[0] == '0')) { + o.prefill_auto_cap = 0; + o.prefill_chunk = std::max(o.prefill_chunk, 8192); + } + } } else (void) cudaGetLastError(); } #endif