Download patches/01-sgl-kernel-sm90a.patch from Radioheading/Kimi-K3-W4AFP8: direct link, hf CLI and curl.
- Browser
- Download file 798 Bytes
-
https://huggingface.co/Radioheading/Kimi-K3-W4AFP8/resolve/main/patches/01-sgl-kernel-sm90a.patch
- Command line
-
hf download hf://Radioheading/Kimi-K3-W4AFP8/patches/01-sgl-kernel-sm90a.patch
-
curl -L -o 01-sgl-kernel-sm90a.patch https://huggingface.co/Radioheading/Kimi-K3-W4AFP8/resolve/main/patches/01-sgl-kernel-sm90a.patch
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 | |
| 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" | |
| ) | |