Skip to content

Commit 57d4f4f

Browse files
Merge pull request #715 from Tony363/fix/unified-apu-name-fallback
fix: unified APU name fallback in GPU detection
2 parents 82d236b + 215c675 commit 57d4f4f

File tree

1 file changed

+6
-1
lines changed
  • dream-server/extensions/services/dashboard-api

1 file changed

+6
-1
lines changed

dream-server/extensions/services/dashboard-api/gpu.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,13 @@ def get_gpu_info_amd() -> Optional[GPUInfo]:
9595
if power_str:
9696
power_w = round(int(power_str) / 1e6, 1)
9797

98-
gpu_name = _read_sysfs(f"{base}/product_name") or "AMD Radeon"
98+
gpu_name = _read_sysfs(f"{base}/product_name")
9999
memory_type = "unified" if is_unified else "discrete"
100+
if not gpu_name:
101+
if is_unified:
102+
gpu_name = get_gpu_tier(mem_total / (1024**3), memory_type)
103+
else:
104+
gpu_name = "AMD Radeon"
100105

101106
mem_used_mb = mem_used // (1024 * 1024)
102107
mem_total_mb = mem_total // (1024 * 1024)

0 commit comments

Comments
 (0)