diff --git a/python/sglang/kernels/jit/utils/arch.py b/python/sglang/kernels/jit/utils/arch.py index 4183ab9f36..7091d1790b 100644 --- a/python/sglang/kernels/jit/utils/arch.py +++ b/python/sglang/kernels/jit/utils/arch.py @@ -18,6 +18,7 @@ from sglang.kernels.jit.utils.common import ( is_hip_runtime, is_musa_runtime, ) +from sglang.srt.utils.common import is_cuda logger = logging.getLogger(__name__) @@ -182,8 +183,6 @@ def is_arch_support_pdl() -> bool: def get_activation_cuda_cflags() -> list[str]: - """Match the AOT activation fast-math policy without changing other kernels.""" - # Blackwell needs precise expf; HIP clang rejects --use_fast_math. - if is_hip_runtime() or get_jit_cuda_arch().major >= 10: - return [] - return ["--use_fast_math"] + if is_cuda(): + return ["--use_fast_math"] + return []