move is_sm90_supported/is_sm100_supported to python/sglang/srt/utils.py (#9679)

This commit is contained in:
Lianmin Zheng
2025-08-27 03:34:29 -07:00
committed by GitHub
parent ae7428a8a7
commit fd71b11b1d
13 changed files with 37 additions and 37 deletions

View File

@@ -172,6 +172,20 @@ def is_blackwell():
return torch.cuda.get_device_capability()[0] == 10
@lru_cache(maxsize=1)
def is_sm100_supported(device=None) -> bool:
return (torch.cuda.get_device_capability(device)[0] == 10) and (
torch.version.cuda >= "12.8"
)
@lru_cache(maxsize=1)
def is_sm90_supported(device=None) -> bool:
return (torch.cuda.get_device_capability(device)[0] == 9) and (
torch.version.cuda >= "12.3"
)
_warned_bool_env_var_keys = set()