diff --git a/src/prefill/gdn_chunk.cu b/src/prefill/gdn_chunk.cu index cec287e8..1f18137c 100644 --- a/src/prefill/gdn_chunk.cu +++ b/src/prefill/gdn_chunk.cu @@ -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; diff --git a/src/prefill/kernels.cu b/src/prefill/kernels.cu index c4e0dd17..598b94e8 100644 --- a/src/prefill/kernels.cu +++ b/src/prefill/kernels.cu @@ -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