diff --git a/python/sglang/kernels/aot/CMakeLists.txt b/python/sglang/kernels/aot/CMakeLists.txt index d76c00880..d456c2b29 100644 --- a/python/sglang/kernels/aot/CMakeLists.txt +++ b/python/sglang/kernels/aot/CMakeLists.txt @@ -206,14 +206,22 @@ if (ENABLE_BELOW_SM90) endif() if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "12.8" OR SGL_KERNEL_ENABLE_SM100A) + # sm_100f is available in CUDA 12.9+ and covers all sm_100, sm_103, sm_107, sm_10x + if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "12.9") + list(APPEND SGL_KERNEL_CUDA_FLAGS + "-gencode=arch=compute_100f,code=sm_100f" + ) + else() + list(APPEND SGL_KERNEL_CUDA_FLAGS + "-gencode=arch=compute_100a,code=sm_100a" + ) + endif() list(APPEND SGL_KERNEL_CUDA_FLAGS - "-gencode=arch=compute_100a,code=sm_100a" "-gencode=arch=compute_120a,code=sm_120a" ) # refer sm_121, sm_110 and sm_101 description https://github.com/pytorch/pytorch/pull/156176 if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "13.0") list(APPEND SGL_KERNEL_CUDA_FLAGS - "-gencode=arch=compute_103a,code=sm_103a" "--compress-mode=size" ) if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") diff --git a/python/sglang/kernels/aot/cmake/flashmla.cmake b/python/sglang/kernels/aot/cmake/flashmla.cmake index 7387f3e5d..11d5380d9 100644 --- a/python/sglang/kernels/aot/cmake/flashmla.cmake +++ b/python/sglang/kernels/aot/cmake/flashmla.cmake @@ -35,8 +35,9 @@ if(${CUDA_VERSION} VERSION_GREATER 12.4) ) endif() if(${CUDA_VERSION} VERSION_GREATER 12.8) + # sm_100f is compatible with all sm_10x list(APPEND FLASHMLA_CUDA_FLAGS - "-gencode=arch=compute_100a,code=sm_100a" + "-gencode=arch=compute_100f,code=sm_100f" ) set(FLASHMLA_ENABLE_SM100 ON) endif() @@ -89,10 +90,6 @@ if(${CUDA_VERSION} VERSION_GREATER_EQUAL "13.0") else() message(STATUS "cutlass/arch/config.h already patched for SM103a") endif() - - list(APPEND FLASHMLA_CUDA_FLAGS - "-gencode=arch=compute_103a,code=sm_103a" - ) endif() diff --git a/python/sglang/kernels/aot/csrc/moe/fp8_blockwise_moe_kernel.cu b/python/sglang/kernels/aot/csrc/moe/fp8_blockwise_moe_kernel.cu index e6a2ccbb9..8bad67e42 100644 --- a/python/sglang/kernels/aot/csrc/moe/fp8_blockwise_moe_kernel.cu +++ b/python/sglang/kernels/aot/csrc/moe/fp8_blockwise_moe_kernel.cu @@ -711,6 +711,9 @@ void fp8_blockwise_scaled_grouped_mm( if (sm_version == 100 #if CUDA_VERSION >= 12090 || sm_version == 103 +#endif +#if CUDA_VERSION >= 13040 + || sm_version == 107 #endif ) { if (output.scalar_type() == torch::kBFloat16) {