gdn chunk / Volta recurrence: name the sm_70-only kernels only in the host pass and the sm_70 device pass (a 60;70 or 70;86 build failed in the other device passes)

This commit is contained in:
Niko1221 committed 2026-10-15 08:55:08 +02:00
1 parent 036d473a3c
commit dea9b6de5d
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -532,7 +532,7 @@ void gdn_chunk_recurrence(float* state, const float* h, const float* gate, const
(void) state; (void) h; (void) gate; (void) beta; (void) oc; (void) T; (void) stream;
std::fprintf(stderr, "gdn_chunk_recurrence: not built for HIP\n");
std::exit(1);
#else
#elif !defined(__CUDA_ARCH__) || __CUDA_ARCH__ >= 700 // the sm_60 device pass of a multi-arch build has no wmma kernel to name
if (T <= 0) return;
const int64_t T64 = T - T % CH;
if (T64 <= 0) return;
+1 -1
View File
@@ -2116,7 +2116,7 @@ void gdn_recurrence_variant(int variant, float* state, const float* h, const flo
(void) variant; // the quad recurrence kernels are AMD-only
#endif
static const bool serial = std::getenv("STRATA_GDN_REC_HEADS") != nullptr; // the one-block-per-head kernel (A/B)
#if defined(STRATA_EXPERIMENTAL_SM60)
#if defined(STRATA_EXPERIMENTAL_SM60) && (!defined(__CUDA_ARCH__) || __CUDA_ARCH__ == 700) // the kernels exist in the host pass and the sm_70 device pass only
// v100/gdn-chunk: the chunked recurrence (src/prefill/gdn_chunk.cu) on Volta, where the token chain is the
// cost. STRATA_GDN_CHUNK=0 forces the recurrence, =1 forces the chunked path (the parity test's A/B switch);
// unset: cc == 7.0 only, every other architecture keeps the recurrence bit-for-bit as before. Read per call