[Perf] Enable fast-math for JIT activations on Blackwell (#43236)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d8f8522348
commit
7ff3a11284
@@ -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 []
|
||||
|
||||
Reference in New Issue
Block a user