Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e8a564649
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
0e8a564 to
e738724
Compare
…in gfx2hlsl Part of R0Y00#1723. s_absdiff_i32 subtracts the smaller signed source from the larger, so an overflowing difference wraps like the hardware. SCC is unchanged by the pack forms and is result != 0 for s_absdiff_i32.
e738724 to
7b95c2a
Compare
|
Head Vector part, drawn on the card — Scalar part.
960 words compared against the fixture's own reference, no mismatch, and the four wrong-reference controls are caught. The sets contain One thing I looked at and could not turn into a defect. The lowering is AI-assisted. |
|
Thanks for the hardware run. Result: PASS, no code change needed. You ran head What it means for the PR:
On the AI-assisted; commands listed were executed locally. |
|
Closing this PR for now to keep the Windows test queue short. Nothing is wrong with it and the branch stays as it is. We will reopen it once the queue is clear, re-run the Win2025 WARP checks at its head, and post the result here. AI-assisted; commands listed were executed locally. |
|
@tedin7, there has been no activity here since the pause, so I'm picking this up. I'll open a new PR with your two commits rebased on current main, keeping your authorship, and link it here. AI-assisted. |
|
Opened as #2512: your two commits rebased on current main with your authorship, plus a test-evaluator assertion and the CI/AGENTS.md listing. AI-assisted. |
…in gfx2hlsl (continues #2086, Part of #1723) (#2512) * shader: lower s_pack_ll_b32_b16, s_pack_lh_b32_b16 and s_absdiff_i32 in gfx2hlsl Part of #1723. s_absdiff_i32 subtracts the smaller signed source from the larger, so an overflowing difference wraps like the hardware. SCC is unchanged by the pack forms and is result != 0 for s_absdiff_i32. * shader: wrap s_absdiff_i32 difference, refuse lane-mask and descriptor sources * tests: require a signed argument for abs in the gfx2hlsl integer evaluator HLSL abs of a uint is the identity, so an s_absdiff_i32 lowering that dropped asint would still have passed the evaluator. Assert that abs gets a signed value. AI-assisted. * tests: list startup_gfx2hlsl_pack_absdiff_check with the other pure-Python checks Add it to the Linux CI Python list and the AGENTS.md list next to startup_gfx2hlsl_sop2_complement_check, whose helpers it imports. AI-assisted. --------- Co-authored-by: tedin7 <tommasoderosa94@gmail.com> Co-authored-by: tedin7 <110300616+tedin7@users.noreply.github.com>
Part of #1723
What this unblocks: startup shaders that use the RDNA2 scalar halfword packs
s_pack_ll_b32_b16ands_pack_lh_b32_b16and the scalars_absdiff_i32now translate instead of stopping at "Unsupported".Change
tools/startup/gfx2hlsl.py: three new entries in the scalar table, and the pack forms share the existings_pack_hh_b32_b16guard (lane masks, descriptor data and destinations outside s0..s105/m0 are refused).s_pack_ll_b32_b16:D = (S0 & 0xffff) | (S1 << 16); SCC unchanged.s_pack_lh_b32_b16:D = (S0 & 0xffff) | (S1 & 0xffff0000); SCC unchanged.s_absdiff_i32: larger signed source minus the smaller one, wrapping on 32 bits; SCC = (D != 0). It is notabs(S0 - S1): when the signed difference overflows, the two differ.s_pack_hh_b32_b16was already on main and is only re-checked here.tests/startup_gfx2hlsl_pack_absdiff_check.py, registered inCMakeLists.txtasstartup_gfx2hlsl_pack_absdiff: reuses the SOP2 encoder, operand forms (SGPR, inline, literal, m0, in-place) and integer evaluator of the existing complement check, and compares the emitted lines with an integer reference over edge values. It also checks that the pack forms refuse lane-mask operands and that a swapped reference is caught.Verification
Run on the Linux worker (Python only, no GPU):
python3 -B tests/startup_gfx2hlsl_pack_absdiff_check.pyonorigin/main: fails (refused: s_absdiff_i32; pack_ll and pack_lh mismatch).startup_gfx2hlsl_pack_absdiff_check: ok.python3 -B tests/startup_gfx2hlsl_sop2_complement_check.py: PASS.python3 -B tests/startup_gfx2hlsl_bit_alu_check.py: ok.python3 -B tests/startup_gfx2hlsl_scalar_m0_check.py: controls passed.Win2025 commands: not run (no Windows host in this worker).
AI-assisted; commands listed were executed locally.