From 946804e042921fadfb60403bb4baa45d0a153fec Mon Sep 17 00:00:00 2001 From: Baizhou Zhang Date: Tue, 7 Jul 2026 01:46:44 -0700 Subject: [PATCH] Disable FA3 sparse mask kernels by default (#30356) --- sgl-kernel/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sgl-kernel/CMakeLists.txt b/sgl-kernel/CMakeLists.txt index 828f23b33..3c3a9f416 100644 --- a/sgl-kernel/CMakeLists.txt +++ b/sgl-kernel/CMakeLists.txt @@ -174,6 +174,7 @@ option(SGL_KERNEL_ENABLE_BF16 "Enable BF16" ON) option(SGL_KERNEL_ENABLE_FP8 "Enable FP8" ON) option(SGL_KERNEL_ENABLE_FP4 "Enable FP4" OFF) option(SGL_KERNEL_ENABLE_FA3 "Enable FA3" ${DEFAULT_SGL_KERNEL_ENABLE_FA3}) +option(SGL_KERNEL_ENABLE_FA3_SPARSE_MASK "Enable FA3 sparse mask kernels" OFF) option(SGL_KERNEL_ENABLE_SM90A "Enable SM90A" OFF) option(SGL_KERNEL_ENABLE_SM100A "Enable SM100A" OFF) @@ -472,6 +473,9 @@ if (SGL_KERNEL_ENABLE_FA3) if(NOT ENABLE_BELOW_SM90) list(APPEND FLASH_OPS_COMPILE_DEFS FLASHATTENTION_DISABLE_SM8x) endif() + if(NOT SGL_KERNEL_ENABLE_FA3_SPARSE_MASK) + list(APPEND FLASH_OPS_COMPILE_DEFS FLASHATTENTION_DISABLE_SPARSE_MASK) + endif() target_compile_definitions(flash_ops PRIVATE ${FLASH_OPS_COMPILE_DEFS}) endif()