Tests: verify RDNA2 integer V_CMP, V_CMPX, SAVEEXEC, and CBRANCH ops #1449
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1459"
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 ivall/xcl. Originally posted by Vadson159 on 2026-11-24T16:25:16Z.
Add DXC compilation and GPU verification tests for RDNA2 integer/64-bit
V_CMP_*,V_CMPX_*, allS_*_SAVEEXEC_*/S_*_WREXEC_*wave-mask operations, scalar conditional branches, andV_CNDMASK_B32with non-VCC SGPR masks against public AMD RDNA2 ISA semantics.Over ~800 lines because all five tests share the local
ProgBuilder, wave-configuration helpers, and DXC/runner harness in one standalone integration test binary instead of duplicating the harness across separate PRs or modifying shared test harnesses.What is in it
crates/xcl/tests/gpu_recomp_exec_cmp.rs: adds 5 tests (exec_cmp_translate_and_compile_with_dxc,gpu_v_cmp_integer_and_64bit_all_predicates,gpu_v_cmpx_exec_masking_and_encodings,gpu_saveexec_and_wrexec_all_forms,gpu_cbranch_masks_and_v_cndmask_sgpr) across all four translation/DXC wave options (wave64,split-wave64,wave32,wave32@hw64) and adapter-supported GPU wave configurations, covering:V_CMP_*(I32,U32,I16,U16,I64,U64) across all ISA predicates (F,LT,EQ,LE,GT,NE,GE,T) inENC_VOPCandENC_VOP3,SDST = NULL, inline/SGPR/literal sources, ignored upper 16 bits on 16-bit comparisons, andwave32odd-SGPR preservationV_CMPX_*(ENC_VOPCandENC_VOP3) across integer and float/CLASSforms (F32,F16,CLASS_F32,CLASS_F16), verifyingEXEC_after == EXEC_before & cond,VDSTnon-interference inENC_VOP3, and post-V_CMPXlane maskingS_*_SAVEEXEC_*andS_*_WREXEC_*ops (_B32across wave modes and_B64on 64-lane waves), checkingSDST(old vs newEXEC),EXEC,SCC, and_B32upper-half preservationS_CBRANCH_{VCCZ,VCCNZ,EXECZ,EXECNZ,SCC0,SCC1}(including upper-half-only 64-bit masks and a divergentV_CMPX+S_CBRANCH_EXECNZloop) andV_CNDMASK_B32(ENC_VOP3) with lane-local and constant SGPR masksTested
rustc 1.100.0 (0ef1bc386 2026-11-09), debug build, DXCdxcompiler 1.8.2502.11 (23992152)/dxil 1.8.2502.11(Windows SDK10.0.26100.0)$env:XCL_REQUIRE_GPU="wave64,mesh"; .\scripts\test.ps1(cargo build --workspace && cargo test --workspace -- --test-threads=4): 775 passed, 0 failed, 41 ignored, 0 GPU tests skipped (tests/gpu_recomp_exec_cmp.rs: 5 passed, 0 failed, 0 ignored)rustfmt --check crates\xcl\tests\gpu_recomp_exec_cmp.rsandcargo clippy -p xcl --test gpu_recomp_exec_cmp -- --no-deps: 0 warnings incrates/xcl/tests/gpu_recomp_exec_cmp.rsRegression run
crates/xcl/tests/(crates/xcl/src/outside tests and runtime build manifests are untouched).Not tested
XCL_SAMPLE_RPF,XCL_SAMPLE_DLLS,XCL_SAMPLE_TTPF,XCL_SAMPLE_BCPACK,XCL_SAMPLE_BK2,XCL_SAMPLE_BVH4,XCL_SAMPLE_AWC,XCL_SAMPLE_XG,XCL_SAMPLE_DXCare unset locally; noscripts/smoke.ps1run)cargo test --release) and non-RDNA4 / NVIDIA / wave32-only GPUsAI use
crates/xcl/tests/gpu_recomp_exec_cmp.rs, and ran formatting, clippy, and the workspace GPU test suite.Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-24T16:34:40Z.
NVIDIA run (32 lanes only), which this PR lists as not tested, plus a second RDNA4 one.
Tested: pass, head
0b3f4c7applied on its basemainb7aa9f3, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --test gpu_recomp_exec_cmp -- --test-threads=4withXCL_ADAPTERset to each GPU:All five ok on both:
exec_cmp_translate_and_compile_with_dxc,gpu_v_cmp_integer_and_64bit_all_predicates,gpu_v_cmpx_exec_masking_and_encodings,gpu_saveexec_and_wrexec_all_forms,gpu_cbranch_masks_and_v_cndmask_sgpr.Not tested: release build; Intel; the whole workspace suite.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:52:54Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:38Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:50:06Z.
Triage (#1607) – head
0b3f4c7Test-only: a new
crates/xcl/tests/gpu_recomp_exec_cmp.rs. No open or merged PR adds the same V_CMP / V_CMPX / SAVEEXEC / CBRANCH coverage, and the runner and encoder APIs it uses (wave64_programs_supported,graphics_wave32,rdna2::encode,Options::split_wave64/hw_wave) are unchanged on main. No problems found in the diff. At 1523 lines it is over the size guideline; the description says why.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.