From 85a108a7513142d43fb1fc69aab2326efa2bdea5 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Wed, 7 Oct 2026 20:27:55 +0200 Subject: [PATCH] gdn_rec_parity: same STRATA_GDN_CHUNKED=2 SM-count bypass as the engine copy --- src/prefill/gdn_rec_parity.cu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/prefill/gdn_rec_parity.cu b/src/prefill/gdn_rec_parity.cu index b2cb6994..8df8ef99 100644 --- a/src/prefill/gdn_rec_parity.cu +++ b/src/prefill/gdn_rec_parity.cu @@ -563,7 +563,9 @@ cudaError_t gdn_rec_chunked(float* state, const float* h, const float* gate, con cudaGetLastError(); return cudaErrorNotSupported; } - if (major < 8 || sms < HK * (S / GDV) || (size_t) smem < kChunkScanSmem) + // as in kernels.cu: STRATA_GDN_CHUNKED=2 skips the SM-count test (to measure a card under 128 SMs) + static const bool any_sms = [] { const char* v = std::getenv("STRATA_GDN_CHUNKED"); return v != nullptr && std::atoi(v) >= 2; }(); + if (major < 8 || (!any_sms && sms < HK * (S / GDV)) || (size_t) smem < kChunkScanSmem) return cudaErrorNotSupported; } float* scratch = gdn_chunk_scratch();