Skip to content

EAI-8241: fix-9-igpu-dgpu returns 0 for print-only missing --device-index path - #303

Merged
r0x0r merged 1 commit into
mainfrom
fix/fix9-dry-run-exit-code
Aug 25, 2026
Merged

EAI-8241: fix-9-igpu-dgpu returns 0 for print-only missing --device-index path#303
r0x0r merged 1 commit into
mainfrom
fix/fix9-dry-run-exit-code

Conversation

@r0x0r

@r0x0r r0x0r commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

rocm fix fix-9-igpu-dgpu --dry-run (invoked without --device-index) exited
with 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-index is absent, the fix-9-igpu-dgpu runner only prints the
rocminfo / hipInfo query that helps the user identify the discrete GPU
index — a print-only preview. Both the Linux and Windows missing-argument
branches returned 3 before the dry_run/print-only semantics applied, so the
user saw an environment/OS failure code instead of the documented success.

Fix

  • Return 0 from the missing---device-index branch on both platforms, since
    it is a print-only path (matching the module contract: 0 =
    ok/dry-run/print-only).
  • Add a regression test asserting exit 0 for the missing-argument path both
    with and without --dry-run.

Verification

  • New regression test fix_9_without_device_index_is_print_only_and_returns_zero
    passes; all fix:: module tests pass.
  • cargo clippy -p rocm-core --all-targets -- -D warnings clean.
  • Manual repro now exits 0:
    rocm fix fix-9-igpu-dgpu --dry-run -> exit 0.

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.

…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>
@r0x0r
r0x0r requested a review from a team as a code owner August 24, 2026 08:55
@r0x0r
r0x0r requested a review from tomastola August 24, 2026 08:55
@r0x0r
r0x0r added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit bfce69a Aug 25, 2026
24 checks passed
@r0x0r
r0x0r deleted the fix/fix9-dry-run-exit-code branch August 25, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants