EAI-8241: fix-9-igpu-dgpu returns 0 for print-only missing --device-index path - #303
Merged
Conversation
…ce-index path The fix-9-igpu-dgpu runner returned exit code 3 (environment/OS not right) when --device-index was absent, even though that branch only prints the rocminfo / hipInfo query used to identify the dGPU index. The runner documents this as a print-only path, and the module contract maps print-only/dry-run to exit 0, so 'rocm fix fix-9-igpu-dgpu --dry-run' now exits 0 as documented instead of 3. Correct both the Linux and Windows missing-argument branches to return 0 and add a regression test covering the path with and without --dry-run. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
tomastola
approved these changes
Aug 24, 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.
Summary
rocm fix fix-9-igpu-dgpu --dry-run(invoked without--device-index) exitedwith code 3 ("environment/OS not right") even though the runner documents
that path as print-only and the module contract maps print-only/dry-run to
exit 0.
Root cause
When
--device-indexis absent, thefix-9-igpu-dgpurunner only prints therocminfo/hipInfoquery that helps the user identify the discrete GPUindex — a print-only preview. Both the Linux and Windows missing-argument
branches returned
3before thedry_run/print-only semantics applied, so theuser saw an environment/OS failure code instead of the documented success.
Fix
0from the missing---device-indexbranch on both platforms, sinceit is a print-only path (matching the module contract:
0=ok/dry-run/print-only).
0for the missing-argument path bothwith and without
--dry-run.Verification
fix_9_without_device_index_is_print_only_and_returns_zeropasses; all
fix::module tests pass.cargo clippy -p rocm-core --all-targets -- -D warningsclean.0:rocm fix fix-9-igpu-dgpu --dry-run-> exit0.This change only alters the CLI exit code / documented behavior for an existing
print-only path; no GPU hardware path is affected, so it is covered by unit
tests at the crate level.