We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa1b888 commit f56fca4Copy full SHA for f56fca4
lightllm/utils/device_utils.py
@@ -82,7 +82,12 @@ def get_current_device_name():
82
83
if torch.cuda.is_available():
84
device = torch.cuda.current_device()
85
- gpu_name = torch.cuda.get_device_name(device).replace(" ", "_")
+ gpu_name = torch.cuda.get_device_name(device)
86
+ # 4090 trans to 4090 D
87
+ if "4090" in gpu_name and "4090 D" not in gpu_name:
88
+ gpu_name = gpu_name.replace("4090", "4090 D")
89
+
90
+ gpu_name = gpu_name.replace(" ", "_")
91
return gpu_name
92
else:
93
return None
0 commit comments