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++
prefill: STRATA_DBG_FORCE_SLOW_LAYER=1 exercises the fused-buffer backstop (#954)
Niko1221b540e994b861
diff --git a/src/prefill/prefill.cpp b/src/prefill/prefill.cppindex 2d97f6c83..15ae9438e 100644--- a/src/prefill/prefill.cpp+++ b/src/prefill/prefill.cpp@@ -2528,7 +2528,9 @@ bool Prefill::run_impl(const int64_t* tokens, int64_t n, int64_t pos0, std::stri// that never returns (the first ck() to see it is `prefill mmq: iota`, one prompt later). fused_layout()// and fused_ring() keep the shrink and this decision in step; this is the backstop for anything that// drifts: a clear error, never a hang.- if (!fused_l && m.fused_bufs && T >= stream_all_min()) {+ // STRATA_DBG_FORCE_SLOW_LAYER=1 (a test of the backstop): layer 0 counts as one the fused path does not take+ static const bool force_slow = [] { const char* e = std::getenv("STRATA_DBG_FORCE_SLOW_LAYER"); return e && e[0] == '1'; }();+ if ((!fused_l || (force_slow && l == 0)) && m.fused_bufs && T >= stream_all_min()) {err = "prefill: the fused layout's MoE buffers are too small for layer " + std::to_string(l) +"'s expert path at a chunk of " + std::to_string(T) + " tokens";return false;diff --git a/sycl/src/prefill/prefill.cpp b/sycl/src/prefill/prefill.cppindex 574a1841f..ae02fbc7f 100644--- a/sycl/src/prefill/prefill.cpp+++ b/sycl/src/prefill/prefill.cpp@@ -2567,7 +2567,9 @@ bool Prefill::run(const int64_t *tokens, int64_t n, int64_t pos0,// that never returns (the first ck() to see it is `prefill mmq: iota`, one prompt later). fused_layout()// and fused_ring() keep the shrink and this decision in step; this is the backstop for anything that// drifts: a clear error, never a hang.- if (!fused_l && m.fused_bufs && T >= stream_all_min()) {+ // STRATA_DBG_FORCE_SLOW_LAYER=1 (a test of the backstop): layer 0 counts as one the fused path does not take+ static const bool force_slow = [] { const char* e = std::getenv("STRATA_DBG_FORCE_SLOW_LAYER"); return e && e[0] == '1'; }();+ if ((!fused_l || (force_slow && l == 0)) && m.fused_bufs && T >= stream_all_min()) {err = "prefill: the fused layout's MoE buffers are too small for layer " + std::to_string(l) +"'s expert path at a chunk of " + std::to_string(T) + " tokens";return false;