[NVIDIA] Use sm_100f instead of sm_100a for sgl-kernel and FlashMLA (#33433)
This commit is contained in:
@@ -206,14 +206,22 @@ if (ENABLE_BELOW_SM90)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "12.8" OR SGL_KERNEL_ENABLE_SM100A)
|
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
|
list(APPEND SGL_KERNEL_CUDA_FLAGS
|
||||||
"-gencode=arch=compute_100a,code=sm_100a"
|
|
||||||
"-gencode=arch=compute_120a,code=sm_120a"
|
"-gencode=arch=compute_120a,code=sm_120a"
|
||||||
)
|
)
|
||||||
# refer sm_121, sm_110 and sm_101 description https://github.com/pytorch/pytorch/pull/156176
|
# refer sm_121, sm_110 and sm_101 description https://github.com/pytorch/pytorch/pull/156176
|
||||||
if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "13.0")
|
if ("${CUDA_VERSION}" VERSION_GREATER_EQUAL "13.0")
|
||||||
list(APPEND SGL_KERNEL_CUDA_FLAGS
|
list(APPEND SGL_KERNEL_CUDA_FLAGS
|
||||||
"-gencode=arch=compute_103a,code=sm_103a"
|
|
||||||
"--compress-mode=size"
|
"--compress-mode=size"
|
||||||
)
|
)
|
||||||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||||
|
|||||||
@@ -35,8 +35,9 @@ if(${CUDA_VERSION} VERSION_GREATER 12.4)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if(${CUDA_VERSION} VERSION_GREATER 12.8)
|
if(${CUDA_VERSION} VERSION_GREATER 12.8)
|
||||||
|
# sm_100f is compatible with all sm_10x
|
||||||
list(APPEND FLASHMLA_CUDA_FLAGS
|
list(APPEND FLASHMLA_CUDA_FLAGS
|
||||||
"-gencode=arch=compute_100a,code=sm_100a"
|
"-gencode=arch=compute_100f,code=sm_100f"
|
||||||
)
|
)
|
||||||
set(FLASHMLA_ENABLE_SM100 ON)
|
set(FLASHMLA_ENABLE_SM100 ON)
|
||||||
endif()
|
endif()
|
||||||
@@ -89,10 +90,6 @@ if(${CUDA_VERSION} VERSION_GREATER_EQUAL "13.0")
|
|||||||
else()
|
else()
|
||||||
message(STATUS "cutlass/arch/config.h already patched for SM103a")
|
message(STATUS "cutlass/arch/config.h already patched for SM103a")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND FLASHMLA_CUDA_FLAGS
|
|
||||||
"-gencode=arch=compute_103a,code=sm_103a"
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -711,6 +711,9 @@ void fp8_blockwise_scaled_grouped_mm(
|
|||||||
if (sm_version == 100
|
if (sm_version == 100
|
||||||
#if CUDA_VERSION >= 12090
|
#if CUDA_VERSION >= 12090
|
||||||
|| sm_version == 103
|
|| sm_version == 103
|
||||||
|
#endif
|
||||||
|
#if CUDA_VERSION >= 13040
|
||||||
|
|| sm_version == 107
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if (output.scalar_type() == torch::kBFloat16) {
|
if (output.scalar_type() == torch::kBFloat16) {
|
||||||
|
|||||||
Reference in New Issue
Block a user