fix: ROCm GPU enumeration - #1039
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughROCm architecture detection now reads validated GFX evidence from KFD topology data, incorporates it into profile detection, removes ChangesGPU detection and selection
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant run_gpus
participant detect_rocm_profile
participant rocm_gpu_arches
participant KFDTopology
participant format_gpus
User->>run_gpus: run gpus command
run_gpus->>detect_rocm_profile: detect hardware profile
detect_rocm_profile->>rocm_gpu_arches: collect GFX architectures
rocm_gpu_arches->>KFDTopology: read KFD topology
KFDTopology-->>rocm_gpu_arches: validated architecture evidence
rocm_gpu_arches-->>detect_rocm_profile: architecture set
detect_rocm_profile-->>run_gpus: hardware survey
run_gpus->>format_gpus: format GPU survey
format_gpus-->>User: human-readable GPU blocks
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This pull request is currently a draft. Reviews will not take place until the PR is marked as ready for review. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/mesh-llm-hardware-profile/src/lib.rs`:
- Around line 78-80: Update the ROCm/fallback reconciliation around rocm_gpus
and fallback_gpus so it removes only fallback adapters proven to duplicate a
detected ROCm device, using parsed PCI identity or equivalent per-device
matching. Retain unmatched AMD/Radeon/Instinct fallback entries, and add a
regression test covering a host with a detected MI300X plus a separate
fallback-only Radeon adapter.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 46b5eaa6-7a33-4f6c-8eb2-05c0c1e75255
📒 Files selected for processing (3)
crates/mesh-llm-commands/src/gpus.rscrates/mesh-llm-hardware-profile/src/lib.rscrates/mesh-llm-hardware-profile/src/rocm.rs
ddadefa to
4a724f3
Compare
…ngram * origin/main: Add GLM DSA correctness trace reporting (#1033) Add GLM DSA package contract validation (#1032) Add direct quant layer package tooling (#1031) Lock split topology placement (#1050) fix nightly stability Qwen thinking ui(data-mode): migrate legacy harness storage to v2 (#1040) fix: Windows Vulkan runtime dependencies (#1046) test: validate MI300 runtime selection and placement (#1045) fix: support ROCm RDNA APU kernels safely (#1044) fix: ROCm GPU enumeration (#1039) Document public packaging installation channels Fix Windows autoupdate import (#1030) Update llama.cpp upstream pin
Summary
ROCmNandHIPNselectors as aliases while preserving the exact runtime-emitted backend identifier in discovery and CLI outputRoot cause
ROCm adapters could be present but lack the gfx architecture evidence required before the native runtime is loaded. Native-runtime resolution then rejected the ROCm artifact, loaded a CPU runtime, and the authoritative embedded backend reported no selectable GPUs.
The bootstrap probe now reads gfx_target_version from /sys/class/kfd/kfd/topology/nodes. It does not create advertised GPU records. Once the ROCm runtime is loaded, the same in-process Skippy backend enumeration used by other backends supplies the actual devices. llama.cpp currently emits numbered
ROCmNidentifiers for HIP builds; mesh-llm accepts equivalentHIPNselectors for compatibility but does not rename the backend-reported device.Validation
Fixes #651
Summary by CodeRabbit
New Features
Bug Fixes
Tests