fix(tools): report invalid HIP dispatch sizes cleanly #12562
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12562"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T20:33:48Z.
What
Report non-integer
THREADSandOUT_DWORDSarguments through argparse's normal usage-error path instead of leaking aValueErrortraceback. Add regressions for each argument and assert the CLI exits before reading inputs or calling HIP. Fixes #12314.Tested
Linux x86_64, Python 3.11:
python3 -m unittest test_hw_oraclefromtools/hw-oracle: 48 tests passed, 2 platform-dependent skips.ValueErrortraceback. This change: exit 2 with field-specific argparse diagnostics and no traceback.git diff --check upstream/main...HEAD: passed.Windows, HIP runtime, and GPU execution were not tested; these invalid arguments are rejected before file or HIP access.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-28T20:50:57Z.
Review: APPROVED
Independent check on macOS arm64 at
3f59497359(based on current main319621ba2e).python3 -m unittest test_hw_oraclefromtools/hw-oracle: 48 tests OK (3 skips) on Python 3.9.6, 3.13 and 3.14.oracle_hip.pywith the new test: both new subtests error (ValueError), and nothing else changes.oracle_hip.py code x in out 16gives aValueErrortraceback on main anderror: THREADS must be an integerwith exit 2 on this branch.1.5and''for OUT_DWORDS are reported the same way.1_6and32are still accepted, becauseint()accepts them, the same astype=intwould.exceptis caught, and so is swapping the two messages.int(out_dwords or 0)is not caught, but it only changes which exit-2 message an empty string gets, so I see no real gap.check_conventions --base upstream/main,pr_overlap --branch(no open overlap) and amerge-treeagainst main are all clean.LGTM.
Pull request closed