Skip to content

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

Merged
raylitebull merged 1 commit into
xcl-dev:mainfrom
piyonchu:tests/gpu-permlane-wqm-lds-math
Nov 25, 2026
Merged

raylitebull merged 1 commit into
xcl-dev:mainfrom
piyonchu:tests/gpu-permlane-wqm-lds-math

Conversation

@piyonchu

@piyonchu piyonchu commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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.

@DarkPanda69

DarkPanda69 commented Nov 24, 2026 •

Copy link
Copy Markdown

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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

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

Thanks!

@ivall ivall added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants