Kimi-K3-W4AFP8 / patches /01-sgl-kernel-sm90a.patch
Radioheading's picture
Add model card, SGLang patches and prebuilt sm_90a sgl-kernel
78a49cb verified
Raw History Blame Contribute Delete
798 Bytes
diff --git a/python/sglang/kernels/aot/CMakeLists.txt b/python/sglang/kernels/aot/CMakeLists.txt
index 4db9b4b15..5530ef33f 100644
--- a/python/sglang/kernels/aot/CMakeLists.txt
+++ b/python/sglang/kernels/aot/CMakeLists.txt
@@ -240,7 +240,9 @@ if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "12.8" OR SGL_KERNEL_ENABLE_SM100A)
endif()
endif()
-if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "12.4" AND SGL_KERNEL_ENABLE_FA3)
+# sm_90a is needed by every CUTLASS SM90 kernel (W4A8 MoE, FP8 scaled_mm, FP8 blockwise MoE), not only by FA3.
+# Without it (e.g. aarch64 builds with FA3 off) those kernels abort with "Arch conditional MMA instruction".
+if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "12.4")
list(APPEND SGL_KERNEL_CUDA_FLAGS
"-gencode=arch=compute_90a,code=sm_90a"
)