From a6bdc3fb5b85546376a162ccd593cfc086a25778 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Wed, 14 Oct 2026 07:14:39 +0200 Subject: [PATCH] pf_wmma: compile the WMMA kernel bodies only for sm_70+ device passes (a multi-arch 60;70 build failed in the sm_60 pass: no nvcuda::wmma there) --- src/kernels/cuda/iq_kernels.cu | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kernels/cuda/iq_kernels.cu b/src/kernels/cuda/iq_kernels.cu index 92328351..632de825 100644 --- a/src/kernels/cuda/iq_kernels.cu +++ b/src/kernels/cuda/iq_kernels.cu @@ -3922,6 +3922,7 @@ __global__ void __launch_bounds__(WG_THREADS) gemm_iq_f16_grouped_kernel(int ty, const __half* __restrict__ X, int ldx, const int32_t* __restrict__ bounds, int ch_per_e, float* __restrict__ Y, int ldy) { +#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 700 // the sm_60 pass of a multi-arch build has no nvcuda::wmma (the host never launches these there) using namespace nvcuda; constexpr int LDW = WK + 8, LDX = WG_XK + 8; extern __shared__ __align__(16) unsigned char wg_smem[]; @@ -4044,6 +4045,7 @@ __global__ void __launch_bounds__(WG_THREADS) gemm_iq_f16_grouped_kernel(int ty, } __syncthreads(); } +#endif } // ---- STRATA_PF_WMMA2=1 (opt-in): IQ2_S gate/up and IQ4_NL down, tiled like a Volta MoE kernel in the @@ -4135,6 +4137,7 @@ __global__ void __launch_bounds__(W2_NT, 2) gemm_iq_f16_w2_kernel(const uint8_t* int K, const __half* __restrict__ X, int ldx, const int32_t* __restrict__ bounds, int ch_per_e, float* __restrict__ Y, int ldy) { +#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 700 // the sm_60 pass of a multi-arch build has no nvcuda::wmma (the host never launches these there) using namespace nvcuda; using tr = w2_traits; constexpr int NL = w2_nl(), NSUB = tr::raw_k / W2_KT; @@ -4241,6 +4244,7 @@ __global__ void __launch_bounds__(W2_NT, 2) gemm_iq_f16_w2_kernel(const uint8_t* } } } +#endif } bool w2_on() {