[misc] use nvml to get consistent device name (#7582)

This commit is contained in:
youkaichao
2024-08-16 21:15:13 -07:00
committed by GitHub
parent 7c0b7ea214
commit eed020f673
5 changed files with 46 additions and 2 deletions
+4
View File
@@ -27,6 +27,10 @@ class Platform:
def get_device_capability(device_id: int = 0) -> Tuple[int, int]:
raise NotImplementedError
@staticmethod
def get_device_name(device_id: int = 0) -> str:
raise NotImplementedError
@staticmethod
def inference_mode():
"""A device-specific wrapper of `torch.inference_mode`.