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++

qsa prompt attention: STRATA_QSA_WARP=1 only forces the Turing kernels on cards that have the Turing MMA (sm_75+)

Niko1221c61364fc8981
diff --git a/src/kernels/cuda/qsa_prompt_attn.cu b/src/kernels/cuda/qsa_prompt_attn.cu
index b2b5480ce..489a6d5fa 100644
--- a/src/kernels/cuda/qsa_prompt_attn.cu
+++ b/src/kernels/cuda/qsa_prompt_attn.cu
@@ -2272,10 +2272,13 @@ bool qsa_prompt_attn_batch(const float* q, const QsaAttnPools& pools, const int3
cudaGetLastError();
return false;
}
- // STRATA_QSA_WARP=1|attn (an A/B arm): the pre-sm_80 kernels on any card, as RTX 20 runs them
+ // STRATA_QSA_WARP=1|attn (an A/B arm): the pre-sm_80 kernels on any card that has the Turing MMA (sm_75
+ // and newer), as RTX 20 runs them. A card below sm_75 has no m16n8k8: its builds hold a __trap() in those
+ // kernels, so forcing them there killed the engine ("prefill copy_i32: unspecified launch failure" on a
+ // Tesla P100); such a card ignores the switch and keeps the kernel it runs without it.
const char* w = std::getenv("STRATA_QSA_WARP");
- cc[dev] = w && (!std::strcmp(w, "1") || !std::strcmp(w, "attn")) ? 75
- : 10 * strata::cc_major_of(major) + strata::cc_minor_of(minor);
+ const int real_cc = 10 * strata::cc_major_of(major) + strata::cc_minor_of(minor);
+ cc[dev] = w && (!std::strcmp(w, "1") || !std::strcmp(w, "attn")) && real_cc >= 75 ? 75 : real_cc;
}
if (cc[dev] < 70) return false;
volta = cc[dev] < 75; // sm_70: the m8n8k4 kernel (STRATA_PA_VOLTA); STRATA_QSA_WARP=1 still forces the old one