Skip to content

fix(hardware): detect distinct AMD GPU models in multi-GPU ROCm systems#559

Merged
AlexsJones merged 1 commit into
mainfrom
fix/rocm-multi-gpu-detection
May 18, 2026
Merged

fix(hardware): detect distinct AMD GPU models in multi-GPU ROCm systems#559
AlexsJones merged 1 commit into
mainfrom
fix/rocm-multi-gpu-detection

Conversation

@AlexsJones
Copy link
Copy Markdown
Owner

Summary

  • Fixes detect_amd_gpu_rocm_info() which only captured the first GPU's name from rocm-smi --showproductname, causing all GPUs to report as the same model in mixed setups (e.g. RX 7600 + AI Pro R9700)
  • Changed return type from Option<GpuInfo> to Vec<GpuInfo> with per-GPU name/VRAM parsing and grouping by model, matching the existing NVIDIA detection pattern
  • Extracted parsing into testable parse_rocm_smi_output() with 4 unit tests covering: mixed GPUs, identical GPU grouping, iGPU filtering, and missing product name fallback

Closes #550

Test plan

  • cargo test -- test_parse_rocm_smi — 4 new tests pass
  • cargo check — compiles cleanly
  • Manual verification on a multi-AMD-GPU Linux system with ROCm

Previously detect_amd_gpu_rocm_info() returned a single GpuInfo and only
captured the first GPU's name from rocm-smi --showproductname, causing
all GPUs to be reported as the same model. This was incorrect for mixed
setups like RX 7600 + AI Pro R9700.

Refactored to return Vec<GpuInfo> with per-GPU name/VRAM parsing and
grouping by model (matching the existing NVIDIA detection pattern).
Extracted parsing into testable parse_rocm_smi_output() with 4 tests.

Closes #550

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AlexsJones AlexsJones merged commit a100552 into main May 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ROCm incorrect handling of multiple GPUs

1 participant