amd-smi path resolution - #26
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves GPU telemetry collection reliability by resolving the amd-smi executable path for default managed ROCm SDK installs (where amd-smi is not on PATH). It threads the resolved binary path into rocm dash and updates other call sites to prefer the resolved location.
Changes:
- Add
rocm_core::resolve_amd_smi_binary()to locateamd-smiin the managed runtime registry and common home fallbacks. - Allow
AmdSmiCollector/dash daemon runner to use an explicitamd-smibinary path. - Update
rocm(TUI/dash) androcmdto runamd-smivia the resolver instead of assuming it is onPATH.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/rocm-dash-daemon/src/runner.rs | Adds RunnerOptions::amd_smi_binary and uses it to detect GPU telemetry via an explicit amd-smi path. |
| crates/rocm-dash-collectors/src/amd_smi.rs | Adds detect_with_binary so collectors can run amd-smi from a specified path. |
| crates/rocm-core/src/lib.rs | Implements resolve_amd_smi_binary() plus unit tests for home/registry resolution behavior. |
| apps/rocmd/src/lib.rs | Uses the resolver when spawning amd-smi for GPU snapshots. |
| apps/rocm/src/tui.rs | Uses the resolver when spawning amd-smi for TUI GPU telemetry. |
| apps/rocm/src/dash.rs | Passes the resolved amd-smi path into dash daemon runner options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Triage findings — bug is real, CI is shallow, approach is soundI picked this up since the regression was originally ours. Confirmed the bug still exists on
The PR patches all three plus the codex-bridge path, resolves the absolute path via The three CI failures (two aren't this PR's fault)
One product nit worth fixing while we're here
How this should land relative to #38 (the recent
|
|
Thanks for the thorough triage @michaelroy-amd — all four checklist items are addressed in 5446190:
The seam invariant is preserved: resolution stays in the app layer and is passed down as `RunnerOptions.amd_smi_binary`; the collector never calls `resolve_amd_smi_binary` directly. All CI checks are green. |
- Prefer the rocm_venvs/default bin path over ~/.rocm/bin and drop the duplicate ~/.rocm/bin lookup in resolve_amd_smi_binary_in_home. - Route the home-dir fallback through managed_sdk_tool_path so Windows picks up amd-smi.exe/.cmd/.bat instead of only the bare name. - Plumb the amd-smi binary as an OsString through RunnerOptions and AmdSmiCollector instead of lossily converting the path to a String. - Reword docs to say path or command name since callers may pass the bare amd-smi fallback when resolution fails. - Build the Windows home-path test expectation component-wise so it matches the per-join separators the resolver emits. Signed-off-by: Roman <roman.sirokov@amd.com>
rocm dashassumes thatamd-smiis in path (for displaying GPU info), which it is not for default installation. This PR adds logic for amd-smi path resolution.