File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1313import torch
1414
1515import vllm .envs as envs
16- from vllm .utils import cuda_get_device_properties , has_deep_gemm
16+ from vllm .platforms import current_platform
17+ from vllm .utils import has_deep_gemm
1718
1819
1920@functools .cache
2021def is_blackwell_deep_gemm_used () -> bool :
2122 """Return ``True`` if vLLM is configured to use DeepGEMM on a
2223 Blackwell-class GPU.
2324 """
25+ if not (envs .VLLM_USE_DEEP_GEMM and has_deep_gemm ()):
26+ return False
2427
25- if not ( envs . VLLM_USE_DEEP_GEMM and has_deep_gemm ()
26- and _per_block_cast_impl is not None ) :
28+ _lazy_init ()
29+ if _per_block_cast_impl is None :
2730 return False
2831
29- return cuda_get_device_properties (0 , ("major" , ))[0 ] == 10
32+ return (current_platform .is_cuda ()
33+ and current_platform .is_device_capability (100 ))
3034
3135
3236def _missing (* _ : Any , ** __ : Any ) -> NoReturn :
You can’t perform that action at this time.
0 commit comments