Repository navigation
fix(examine): stop the Windows install scans disagreeing with each other - #219
Merged
Merged
Conversation
Three independent implementations answered "where is ROCm installed" on Windows, and they disagreed on every axis that matters. Two of them are now the shared resolver, which is the one already used by examine's install summary, the JSON probe and fix-6-path on Linux. `probe_hip_sdk_windows` scanned a single directory with `versions.sort()`, so `6.2` outranked `6.10`. `newest_rocm_install_dir`, which fix-6-path reaches on Windows, searched `C:\Program Files (x86)\AMD\ROCm` where the resolver searches `C:\Program Files\ROCm`, sorted the same wrong way, and accepted any directory whose name began with a digit -- so an empty leftover could be put on a user's PATH. Both now order by numeric component, search the same roots as the rest of the CLI, require an install marker, and honour `$ROCM_PATH`, which neither did before. `$HIP_PATH` still wins in the SDK probe: it names the SDK specifically, where the resolver answers the broader question. The SDK version now comes from what the install says about itself, falling back to the directory name only for a `$HIP_PATH` pointing somewhere unversioned. The marker gate was checked against a real Windows layout before being applied here: `rocminfo.exe`, `hipcc.bat` and `bin/amdhip64*.dll` are all accepted, so this narrows what counts as an install without losing a genuine one. Tested through fix-6-path's own resolver call rather than the resolver again: the replaced scanner ignored `$ROCM_PATH` entirely and looked only under `C:\Program Files`, so both new tests fail against it on any host -- one proving a planted install is found, one proving an empty directory is not. Signed-off-by: Eugene Volen <Eugene.Volen@amd.com>
1 task done
Collaborator
|
Reviewed this against the live code (not just the diff) and it holds up.
CI is green across every lane including both Windows jobs. The PR is upfront about the one real gap - two-install ordering isn't exercised by any CI lane since the search dirs are hardcoded with no override seam - and that's a reasonable thing to leave as a stated gap rather than block on, given the existing Looks safe to approve after final validation. |
juhovainio
approved these changes
Aug 12, 2026
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.
tests/e2e-cucumber/expectations.tomlfor the fixed ticket ID and removed/narrowed any now-stale xfail rows. No row references this behaviour — it has no e2e seam (see below).Summary
Three independent implementations answered "where is ROCm installed" on Windows, and they disagreed on every axis that matters. Two of them become the shared resolver — the one already used by
examine's install summary, the JSON probe, andfix-6-pathon Linux.C:\Program Files\AMD\ROCm,C:\Program Files\ROCmprobe_hip_sdk_windowsC:\Program Files\AMD\ROCmnewest_rocm_install_dirC:\Program Files\AMD\ROCm,C:\Program Files (x86)\AMD\ROCmSo with 6.2 and 6.10 both installed,
rocm fix fix-6-pathput the older SDK on PATH — and because the third scanner accepted any directory whose name began with a digit, an empty leftover could go on PATH too.Both now order by numeric component, search the same roots as the rest of the CLI, require an install marker, and honour
$ROCM_PATH— which neither did before.$HIP_PATHstill wins in the SDK probe: it names the SDK specifically, where the resolver answers the broader question. The reported SDK version now comes from what the install says about itself, falling back to the directory name only for a$HIP_PATHpointing somewhere unversioned.Checked before narrowing: the resolver's marker gate accepts
bin/rocminfo.exe,bin/hipcc.batandbin/amdhip64*.dll, so a real Windows HIP SDK still matches. This tightens what counts as an install without losing a genuine one — worth confirming, since a marker list written for Linux would have quietly broken Windows detection.Test plan
Two new tests, driven through
fix-6-path's own resolver call rather than re-testing the resolver:$ROCM_PATHis found;$ROCM_PATHis not.Both are discriminating rather than decorative — the scanner they replace ignored
$ROCM_PATHoutright and looked only underC:\Program Files, so both fail against it on any host. That matters here because the change cannot be exercised on Linux at all.cargo test -p rocm-core: 261 pass; the twoproc_lifecycle::tests::tree_*failures are the known WSL2-local issue and reproduce unchanged onmain.cargo fmt --all --check, workspaceclippy --all-targets -D warnings, and the prek hygiene hooks are clean.Verification gap, stated plainly. This has no e2e seam: the search directories are hardcoded constants with no override, so the harness can only plant a single install via
$ROCM_PATH— which bypasses directory scanning and therefore ordering entirely. The Strix Halo Windows lane exercises the code path but cannot plant two versions to order. Unit tests against planted directories are the coverage; a reviewer should not read a green Windows lane as proof the ordering is right.cargo xtask e2eon this branch reports the twodiagnosescenarios failing — that is the known WSL2-local noise this branch does not carry the fix for (#216 adds@requires-bare-metal), not a regression from this change, which touches Windows-only code paths.🤖 Generated with Claude Code