Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion swanlab/data/run/metadata/hardware/gpu/amd.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_amd_gpu_info() -> HardwareFuncResult:
# Linux Logic (Initialization)
# ==========================================

def map_amd_gpu_linux() -> Tuple[Optional[str], dict]:
def map_amd_gpu_linux() -> Tuple[Optional[str], Optional[dict]]:
"""
初始化阶段:尝试获取显卡列表。
虽然 rocm-smi 可能不稳定,但我们只在启动时跑一次。
Expand Down Expand Up @@ -141,6 +141,9 @@ def map_amd_gpu_linux() -> Tuple[Optional[str], dict]:
except Exception:
pass

if len(gpu_map) == 0:
return (None, None)

return driver_version, gpu_map


Expand Down