[Feat] Enable PDL automatically on Hopper architecture (#5981)
This commit is contained in:
@@ -39,3 +39,10 @@ def _to_tensor_scalar_tuple(x):
|
||||
return (x, 0)
|
||||
else:
|
||||
return (None, x)
|
||||
|
||||
|
||||
def is_hopper_arch() -> bool:
|
||||
# Hopper arch's compute capability == 9.0
|
||||
device = torch.cuda.current_device()
|
||||
major, minor = torch.cuda.get_device_capability(device)
|
||||
return major == 9
|
||||
|
||||
Reference in New Issue
Block a user