enable csgmv automatically on cuda (#13600)

This commit is contained in:
b8zhong
2025-11-20 12:53:02 -08:00
committed by GitHub
parent 7291c72e57
commit 42028af614
2 changed files with 7 additions and 0 deletions

View File

@@ -3618,6 +3618,12 @@ def cached_triton_kernel(key_fn=None):
"""
def decorator(fn):
# Auto-enable the custom kernel cache for CUDA, where it is
# known to be compatible.
if is_cuda() and not envs.SGLANG_USE_CUSTOM_TRITON_KERNEL_CACHE.is_set():
logger.debug("Detected platform CUDA, using custom triton kernel cache.")
return CachedKernel(fn, key_fn)
if envs.SGLANG_USE_CUSTOM_TRITON_KERNEL_CACHE.get():
logger.debug(
f"{envs.SGLANG_USE_CUSTOM_TRITON_KERNEL_CACHE.name} = True. Using custom triton kernel cache."