Repository navigation
Shaders: hardware test for the scalar add/sub carry chain and the SOPK forms - #1875
LouisRiverstone wants to merge 1 commit into
Conversation
035433c to
124e45b
Compare
catminou4
left a comment
There was a problem hiding this comment.
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (940d32f), cargo test → 144 passed, 0 failed. GPU execution tests are #[cfg(all(test, windows))] and run only on Windows.
victory-shader. Hardware test for the scalar add/sub carry chain: RDNA2-matched (Windows-gated).
|
Automated triage for the maintainers. This is a test-only change: This inserts at the same place in the file as #1874 and #1876, so whichever merges later needs a trivial rebase. CI: passing. Generated by Claude Code |
Offline measurement on a retail dumpResult: no count change against I merged head 124e45b onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
Automated triage for the maintainers, second look (a review against current Closing as covered by #2015, which runs the same add/addc and sub/subb chains over 625 wide inputs (low dword, high dword and final carry), If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution. |
s_add_u32,s_sub_u32,s_add_i32,s_sub_i32,s_addc_u32,s_subb_u32,s_addk_i32ands_mulk_i32are lowered inlower.rs, with the carry going through SCC, but no hardware test ran them.New test
s_add_sub_carry_chain_and_k_forms_match_rdna2: the four plain forms over 25 pairs, then a 64-bit add (s_add_u32+s_addc_u32) and subtract (s_sub_u32+s_subb_u32) over 225 cases each, reading the high dword so the carry or borrow shows, thens_addk_i32/s_mulk_i32with four immediates (sign-extended). Expected values come fromwrapping_*and au64sum in Rust. Adds a smallsopkencoder next tosop2.Test only, no production change.
Verify:
cargo test -p victory-shader s_add_sub_carry(Windows, hardware GPU or WARP). I type-checked it with clippy forx86_64-pc-windows-msvc, but could not run it locally: the shader test module is Windows-only.🤖 Generated with Claude Code