refactor: abstract deepgemm support into platform (#37519)
Co-authored-by: sherryC41 <sherry.c.c41@gmail.com>
This commit is contained in:
@@ -511,6 +511,11 @@ class CudaPlatformBase(Platform):
|
||||
def support_static_graph_mode(cls) -> bool:
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def support_deep_gemm(cls) -> bool:
|
||||
"""Currently, only Hopper and Blackwell GPUs are supported."""
|
||||
return cls.is_device_capability(90) or cls.is_device_capability_family(100)
|
||||
|
||||
@classmethod
|
||||
def num_compute_units(cls, device_id: int = 0) -> int:
|
||||
return torch.cuda.get_device_properties(device_id).multi_processor_count
|
||||
|
||||
@@ -712,6 +712,13 @@ class Platform:
|
||||
"""
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
def support_deep_gemm(cls) -> bool:
|
||||
"""
|
||||
Returns if DeepGEMM is supported by the current platform.
|
||||
"""
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
def use_custom_op_collectives(cls) -> bool:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user