Tests: cover permlane16, WQM, DS stride64, mulhi, i24, and u64 shifts #1617

Manually merged
github merged 1 commit from gh-pr/1617/head into gh-pr/1617/base 2026-11-26 04:59:36 +00:00
Owner

@⁠piyonchu on GitHub · 2026-11-24 18:16 UTC · original
piyonchu:tests/gpu-permlane-wqm-lds-math → main · +189 −0 · 1 files · 1 commits · merged 2026-11-25 02:02 UTC

Tests only — adds two GPU hardware execution tests to crates/xcl/src/gpu/recomp/tests.rs (ce22d27, rebased onto main 8f5fca5) covering previously untested RDNA2 lane-permute (FI/BOUND_CTRL), scalar whole-quad mask, stride-64 LDS dual reads/writes, scalar sign extension/abs/mulhi, 24-bit integer multiply/mad, 64-bit vector right shifts, and chained carry-borrow subtraction instructions.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs:
    • gpu_permlane16_wqm_and_lds_stride64: runs S_WQM_B32 (non-zero and zero SCC), S_WQM_B64, DS_WRITE2ST64_B32/DS_READ2ST64_B32, DS_WRITE2ST64_B64/DS_READ2ST64_B64, V_PERMLANE16_B32 (all three FI/BOUND_CTRL inactive-source behaviors under masked EXEC), and V_PERMLANEX16_B32 across 64 lanes on the GPU.
    • gpu_scalar_sext_mulhi_and_vector_i24_sub_co_ci_u64_shifts: runs S_SEXT_I32_I8, S_SEXT_I32_I16, S_ABS_I32, S_MUL_HI_U32, S_MUL_HI_I32, V_MUL_HI_U32, V_MUL_HI_I32, V_MUL_I32_I24, V_MUL_HI_I32_I24, V_MAD_I32_I24 (with non-zero upper 8 bits), V_LSHRREV_B64, V_ASHRREV_I64, V_SUB_CO_CI_U32 (VOP3B), and V_SUBREV_CO_CI_U32 (VOP2) on the GPU.

Tested

  • NVIDIA GeForce RTX 4060 Laptop GPU (driver 616.56), Windows 11, DXC/DXIL 1.8.2502.11 (10.0.26100.0), rustc 1.100.0, debug build at commit ce22d2744bbaea51948602f76af11aac82befbd3:
  • cargo test -p xcl --lib gpu_permlane16_wqm_and_lds_stride64: 1 passed, 0 failed (0.51s).
  • cargo test -p xcl --lib gpu_scalar_sext_mulhi_and_vector_i24_sub_co_ci_u64_shifts: 1 passed, 0 failed (0.47s).
  • cargo test --workspace -- --test-threads=4: 1104 passed, 0 failed, 46 ignored.
  • SKIPPED GPU tests on this adapter (no wave64 / no heap windows / no Windows Developer Mode / refused wave32 per-lane f16 #1426 forms): gpu::recomp::lower::tests::{a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu}, gpu::recomp::lower_dxil::tests::{a_per_lane_2d_or_3d_group_runs_on_the_gpu,f16_programs_on_the_gpu,const_and_null_mask_operands_agree_with_hlsl_on_the_gpu,f32_programs_on_the_gpu,integer_programs_on_the_gpu,f64_programs_on_the_gpu}, gpu::recomp::tests::{gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware}, shaders::tests::pso_measurement_compiles_an_exact_synthetic_record, heap_window_out_of_memory_falls_back_to_the_switch_form.
  • python scripts/pr_check.py --local and git diff --check upstream/main..HEAD: passed.

Regression run

  • Not needed: test-only change inside crates/xcl/src/gpu/recomp/tests.rs (only new GPU instruction tests added; no runtime code changed).

Not tested

  • Native wave64 hardware (AMD RDNA2/RDNA3/RDNA4), Windows Developer Mode PSO cache disable, heap-window fallback tests, release build, Wine/Linux, and retail titles (no game package present locally).

AI use

  • Antigravity (Google DeepMind) wrote the new GPU tests, rebased onto main, ran the local workspace test suite, and drafted this PR description.
**@⁠piyonchu** on GitHub · 2026-11-24 18:16 UTC · [original](https://github.com/xcl-dev/xcl/pull/1617) `piyonchu:tests/gpu-permlane-wqm-lds-math` → `main` · +189 −0 · 1 files · 1 commits · merged 2026-11-25 02:02 UTC Tests only — adds two GPU hardware execution tests to `crates/xcl/src/gpu/recomp/tests.rs` (`ce22d27`, rebased onto `main` `8f5fca5`) covering previously untested RDNA2 lane-permute (`FI`/`BOUND_CTRL`), scalar whole-quad mask, stride-64 LDS dual reads/writes, scalar sign extension/abs/mulhi, 24-bit integer multiply/mad, 64-bit vector right shifts, and chained carry-borrow subtraction instructions. **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: - `gpu_permlane16_wqm_and_lds_stride64`: runs `S_WQM_B32` (non-zero and zero SCC), `S_WQM_B64`, `DS_WRITE2ST64_B32`/`DS_READ2ST64_B32`, `DS_WRITE2ST64_B64`/`DS_READ2ST64_B64`, `V_PERMLANE16_B32` (all three `FI`/`BOUND_CTRL` inactive-source behaviors under masked `EXEC`), and `V_PERMLANEX16_B32` across 64 lanes on the GPU. - `gpu_scalar_sext_mulhi_and_vector_i24_sub_co_ci_u64_shifts`: runs `S_SEXT_I32_I8`, `S_SEXT_I32_I16`, `S_ABS_I32`, `S_MUL_HI_U32`, `S_MUL_HI_I32`, `V_MUL_HI_U32`, `V_MUL_HI_I32`, `V_MUL_I32_I24`, `V_MUL_HI_I32_I24`, `V_MAD_I32_I24` (with non-zero upper 8 bits), `V_LSHRREV_B64`, `V_ASHRREV_I64`, `V_SUB_CO_CI_U32` (`VOP3B`), and `V_SUBREV_CO_CI_U32` (`VOP2`) on the GPU. **Tested** - NVIDIA GeForce RTX 4060 Laptop GPU (driver `616.56`), Windows 11, DXC/DXIL `1.8.2502.11` (`10.0.26100.0`), `rustc 1.100.0`, debug build at commit `ce22d2744bbaea51948602f76af11aac82befbd3`: - `cargo test -p xcl --lib gpu_permlane16_wqm_and_lds_stride64`: 1 passed, 0 failed (`0.51s`). - `cargo test -p xcl --lib gpu_scalar_sext_mulhi_and_vector_i24_sub_co_ci_u64_shifts`: 1 passed, 0 failed (`0.47s`). - `cargo test --workspace -- --test-threads=4`: 1104 passed, 0 failed, 46 ignored. - `SKIPPED` GPU tests on this adapter (no wave64 / no heap windows / no Windows Developer Mode / refused wave32 per-lane f16 #1426 forms): `gpu::recomp::lower::tests::{a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu}`, `gpu::recomp::lower_dxil::tests::{a_per_lane_2d_or_3d_group_runs_on_the_gpu,f16_programs_on_the_gpu,const_and_null_mask_operands_agree_with_hlsl_on_the_gpu,f32_programs_on_the_gpu,integer_programs_on_the_gpu,f64_programs_on_the_gpu}`, `gpu::recomp::tests::{gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware}`, `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record`, `heap_window_out_of_memory_falls_back_to_the_switch_form`. - `python scripts/pr_check.py --local` and `git diff --check upstream/main..HEAD`: passed. **Regression run** - Not needed: test-only change inside `crates/xcl/src/gpu/recomp/tests.rs` (only new GPU instruction tests added; no runtime code changed). **Not tested** - Native wave64 hardware (AMD RDNA2/RDNA3/RDNA4), Windows Developer Mode PSO cache disable, heap-window fallback tests, release build, Wine/Linux, and retail titles (no game package present locally). **AI use** - Antigravity (Google DeepMind) wrote the new GPU tests, rebased onto `main`, ran the local workspace test suite, and drafted this PR description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:59:35 +00:00
github manually merged commit ce22d2744b into gh-pr/1617/base 2026-11-26 04:59:36 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 20:37 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 20:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/1617#issuecomment-7143840878) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~22 ignored. Thanks!
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-24 18:27 UTC · original · edited 2026-11-25 01:44 UTC

AMD result with native 64-lane waves, which this PR lists as not tested. Updated for head ce22d27 (first run was on e75cd90, same result).

Tested: pass, head ce22d27 applied on main 3da2abb, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.
cargo test -p xcl --lib -- gpu:: --test-threads=4:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, native wave64: 567 passed, 2 failed, 22 ignored. gpu_permlane16_wqm_and_lds_stride64 and gpu_scalar_sext_mulhi_and_vector_i24_sub_co_ci_u64_shifts ok. The 2 failures are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and _3, which fail the same way on main without this PR on this card.
  • NVIDIA RTX 3060, driver 32.0.16.1088: 569 passed, 0 failed, 22 ignored. Both new tests ok.

Not tested: Intel Arc; release build; the whole workspace suite.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-24 18:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/1617#issuecomment-7140665860) · edited 2026-11-25 01:44 UTC AMD result with native 64-lane waves, which this PR lists as not tested. Updated for head `ce22d27` (first run was on `e75cd90`, same result). **Tested:** pass, head `ce22d27` applied on `main` `3da2abb`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --lib -- gpu:: --test-threads=4`: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, native wave64: 567 passed, 2 failed, 22 ignored. `gpu_permlane16_wqm_and_lds_stride64` and `gpu_scalar_sext_mulhi_and_vector_i24_sub_co_ci_u64_shifts` ok. The 2 failures are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `_3`, which fail the same way on `main` without this PR on this card. - NVIDIA RTX 3060, driver 32.0.16.1088: 569 passed, 0 failed, 22 ignored. Both new tests ok. **Not tested:** Intel Arc; release build; the whole workspace suite. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 05:58 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 05:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/1617#issuecomment-7183967471) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
This discussion has been locked. Commenting is limited to contributors.
No description provided.