Repository navigation
feat(examine): let the user choose which framework to probe - #218
Conversation
2a93504 to
83c5fa8
Compare
|
I reviewed this PR and traced its claims against the live branch code rather than just the diff, and everything held up.
CI is green across the board, including both self-hosted GPU/Strix Halo lanes and the Windows build (relevant here since the CLI enum lives outside Looks safe to approve after final validation - this is a diff-and-code read, not a substitute for CI or a live run. One non-blocking note: this PR is stacked on #217, which is stacked on #216, and should merge in that order for the diffs to stay this small. |
1aa8fed to
f9d6d3f
Compare
83c5fa8 to
0415b50
Compare
`FrameworkProbe` has had four variants all along, and the probe acted on all four. No caller ever passed anything but the default, so from the command line there was no choice to make: `rocm examine --framework skip` was an unknown argument. The fix is wiring, not new capability. The flag is a CLI-side mirror of the library enum rather than a `ValueEnum` derived on it, so clap stays out of rocm-core. It applies to `--json` only and says so: the human report carries no framework line, and a flag that silently does nothing is worse than one that admits its scope. Two unit tests cover what the machine cannot. The mapping is pinned so a renamed variant cannot quietly fall back to the default, and the help output is asserted to offer all four -- that they existed but were unreachable is the whole defect, so "the library has them" is not the thing to test. The scenario becomes @requires-bare-metal. On WSL2 the probe returns as soon as it recognises the platform, before its framework step, so `framework` stays "unknown" whatever the flag says and the scenario has nothing to assert. That the probe gives up that early is a separate defect -- PyTorch on WSL2 is a supported configuration and the report says nothing about it -- and is left to the WSL work rather than smuggled in here. Signed-off-by: Eugene Volen <Eugene.Volen@amd.com>
Removing the xfail row for the framework flag left the file ending in a blank line, which `end-of-file-fixer` rejects. Caught by prek in CI, not locally -- the hook is available here and is worth running before pushing a file whose tail was edited. Signed-off-by: Eugene Volen <Eugene.Volen@amd.com>
0415b50 to
06e9b30
Compare
|
Checked back after the base rebase. The head commits are unchanged (638ed51, 06e9b30) — same diff I already reviewed, just replayed onto |
rominf
left a comment
There was a problem hiding this comment.
Not blocking, and the diff itself looks good to me — I confirmed the key property, that omitting --framework preserves the previous behaviour exactly (the --json branch previously hardcoded FrameworkProbe::Auto, and default_value_t = FrameworkArg::Auto reproduces it verbatim).
One housekeeping item: the PR description carries an AI-generation footer (🤖 Generated with …). Worth stripping before this merges, since the repo is public. The commit messages are clean.
tests/e2e-cucumber/expectations.tomlfor the fixed ticket ID and removed/narrowed any now-stale xfail rows. The row for this gap is removed here.Summary
FrameworkProbehas had four variants all along, and the probe acts on all four. No caller ever passed anything but the default, so from the command line there was no choice to make —rocm examine --framework skipwas an unknown argument. This is wiring, not new capability.The flag is a CLI-side mirror of the library enum rather than a
ValueEnumderived on it, so clap stays out ofrocm-core.It applies to
--jsononly, and the help says so. The human report carries no framework line, so the flag would otherwise be a silent no-op there — worse than one that admits its scope.Test plan
Two unit tests cover what this host cannot:
rocm examine --helpis asserted to offer all four. That they existed in the library but were unreachable is the defect, so "the library has them" would be the wrong thing to assert.Two more in
rocm-corepin the behaviour the flag selects:skiprecords"skipped"— a distinct answer from"unknown", which means the probe ran and found nothing — and touches none of the other framework fields, so it cannot quietly do the work it claims to avoid.Locally:
cargo xtask e2egives 40 scenarios, 3 xfail, 0 XPASS, 0 unexpected.cargo fmt --all --check, workspace clippy,clippy -p e2e-cucumber --test e2e, and the 62 harness unit tests are all clean.A defect found while doing this, and deliberately not fixed here
The scenario becomes
@requires-bare-metal, and the reason is worth a reviewer's attention rather than being buried in a tag.On WSL2 the probe returns as soon as it recognises the platform — before its framework step — so
frameworkstays"unknown"whatever the flag says. Verified on a WSL2 box: all four values yieldunknown. The scenario therefore has nothing to assert there.That early return exists because the driver and kernel probes do not apply under WSL2, which is true. But it also skips the framework probe, and PyTorch on WSL2 is a supported, AMD-documented configuration — so
examine --jsoncan never tell a WSL user what ROCm build their PyTorch has. That is a real gap, it belongs with the rest of the WSL work rather than smuggled in here, and the tag's doc comment now records it so the next reader does not have to rediscover it.🤖 Generated with Claude Code