fix(hardware): detect distinct AMD GPU models in multi-GPU ROCm systems#559
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
detect_amd_gpu_rocm_info()which only captured the first GPU's name fromrocm-smi --showproductname, causing all GPUs to report as the same model in mixed setups (e.g. RX 7600 + AI Pro R9700)Option<GpuInfo>toVec<GpuInfo>with per-GPU name/VRAM parsing and grouping by model, matching the existing NVIDIA detection patternparse_rocm_smi_output()with 4 unit tests covering: mixed GPUs, identical GPU grouping, iGPU filtering, and missing product name fallbackCloses #550
Test plan
cargo test -- test_parse_rocm_smi— 4 new tests passcargo check— compiles cleanly