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. |
Ran it, broke it four ways, and cross-checked the reference model independentlyWindows 11 build 26300.9974, device-free: out/pe-env/Scripts/python.exe -B tests/startup_gfx2hlsl_pknorm_u16_check.py
exit 0Mutations to the lowering, each reverted:
That is the set I would have written by hand, and each one fails a different rule the description states. Two of them — the The reference model agrees with an independent implementationTheir So the model the fixture compares against is not just internally consistent, it matches the rule the description quotes. Your What this still does not establishThe NaN rule is modelled as Small note
VerdictReviewed. Every rule in the description is pinned by a mutation, and the reference matches the ISA text under an independent Notes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1777b62d24
ℹ️ 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".
|
Ran the draw fixtures on WARP and on a physical GPU, in addition to the device-less run and mutations reported above. Head
|
932baac to
f021e9d
Compare
VOP3 only. Each half is clamp(S, 0, 1) * 65535 rounded to nearest even, a NaN reads 0. Output modifiers and op_sel are refused. Refs R0Y00#870.
f021e9d to
e0bccd7
Compare
|
Thank you @ChazY11 and @Makto94 for the independent runs: the device-free checks with the four lowering mutations caught, and the WARP + NVIDIA RTX 3070 Ti draw fixtures at 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. |
Part of #870 (no
Fixes). Draft.What
Lowers
v_cvt_pknorm_u16_f32intools/startup/gfx2hlsl.py. It was refused as unsupported, which stops the pair behind #1710.The instruction is VOP3 only (opcode 0x369, no e32 form). Per the public RDNA ISA description:
Lowering:
uint(round(saturate(a) * 65535.0)) | (uint(round(saturate(b) * 65535.0)) << 16).Source neg and abs reach the operands. Any output modifier (clamp, mul, div) or op_sel is refused, because it would change the packed words. This matches the refusal style of #1755 and #1778 without depending on them. No other open PR implements this instruction.
Change
op_v_cvt_pknorm_u16_f32method (the dispatch finds it by name, so no table row). Placed away from the hunks of startup: refuse an op_sel the float lowering does not model #1755.tests/startup_gfx2hlsl_pknorm_u16_check.pyon the shared lane runner, registered inCMakeLists.txtand.github/workflows/windows.yml.Test
llvm-mc, words recorded (checked with llvm-mc-19 for gfx1010 and gfx1030, same 0x369 VOP3 word; CI uses llvm-mc-15 in binary mode).The reference rounds the binary32 product. For 1.5/65535 that product is exactly 1.5 and ties to 2, while the exact value of the nearest binary32 input is just under 1.5. No hardware run of this instruction was available, so the draw mode is what confirms it.
Commands executed locally
python3 -B tests/startup_gfx2hlsl_pknorm_u16_check.pyand... binary llvm-mc-19: okllvm-mc-19 -mcpu=gfx1010andgfx1030encodings of the instruction, plain, with neg/abs and with clampgit diff --check,tests/docs_links_check.py,tests/bidi_controls_check.py: passgit merge-treeagainstorigin/main, startup: translate v_swap_b32 in gfx2hlsl #1796, startup: lower the binary32 class comparison #1798, startup: refuse a modifier for handlers that do not model one #1778, startup: refuse an op_sel the float lowering does not model #1755, startup: write shader requests from the shader archive before a run #1750: no conflicts. startup: guard and verify 64-bit VOP3 shifts in gfx2hlsl #1783 and startup: lower v_mul_hi_u32 in gfx2hlsl #1747 conflict with main already (same counts as without this branch).AI-assisted; commands listed were executed locally.
Replaces closed draft #1815 (rebased cleanly on origin/main).
AI-assisted; commands listed were executed locally.