Skip to content

Commit f56fca4

Browse files
author
wangzaijun
committed
fix
1 parent fa1b888 commit f56fca4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lightllm/utils/device_utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ def get_current_device_name():
8282

8383
if torch.cuda.is_available():
8484
device = torch.cuda.current_device()
85-
gpu_name = torch.cuda.get_device_name(device).replace(" ", "_")
85+
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(" ", "_")
8691
return gpu_name
8792
else:
8893
return None

0 commit comments

Comments
 (0)