Repository navigation
Tests: check packed f16 VOP3P, v_dot2c_f32_f16, v_pack_b32_f16 and f16 FMA ops on the GPU - #1158
microwave805 wants to merge 1 commit into
Conversation
…6 FMA ops on the GPU Add GPU coverage for eight translated RDNA2 f16 instructions with no existing GPU tests: v_pk_fma_f16, v_pk_min_f16, v_pk_max_f16, v_dot2c_f32_f16, v_pack_b32_f16, v_fmac_f16, v_fmamk_f16 and v_fmaak_f16. Exercises OP_SEL/OP_SEL_HI/OP_SEL_HI_2, NEG/NEG_HI, CLAMP, consecutive dot2c accumulation, upper-16-bit literal masking and untouched VDST half preservation across four distinct exact binary16 lane patterns. Assisted-by: Antigravity (Gemini 4 Neon)
|
Independent verification on current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
|
AMD / Linux data point (the PR's runs were NVIDIA with no wave64). Tested: RX 9070 XT (RDNA4, native wave64), Mesa RADV 26.3.1, CachyOS (kernel 7.3), Proton Experimental
Testing and write-up assisted by Claude Code (Claude Opus 5.5); runs on my own hardware, checked by me. |
Test report on NVIDIA GeForce RTX 2070 SUPER (Turing, wave32)Commit tested Tested
Not tested
AI use
|
|
Tested Clean detached PR head
$exe = 'L:/XclTooling/pr1778-2e2ee55-20261125-020159/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
& $exe gpu::recomp::tests::gpu_packed_f16_fma_min_max_dot2c_and_pack --exact --nocapture --test-threads=1
& $exe gpu::recomp::tests::gpu_f16_fmac_fmamk_fmaak --exact --nocapture --test-threads=12 passed, 0 failed, 0 ignored, 0 skipped, with 720 filtered out per invocation. Both fixtures and wrapper exited 0. Both used HLSL/DXC with split wave64. The first passed 704 lane-output checks in 2.02 s, including packed FMA/min/max, consecutive dot accumulations and all four pack selectors. The second passed 256 checks in 0.30 s, including FMAC, FMAMK, FMAAK, literal masking and preservation of the untouched destination halfword. Not tested Standalone wave32, native wave64, direct DXIL, other adapters, release builds, the workspace suite, and retail smoke. AI use T3 Code / Codex ( |
Adds GPU tests for 8 translated RDNA2 f16 instructions that currently have no GPU coverage in
crates/xcl/src/gpu/recomp/tests.rs:v_pk_fma_f16,v_pk_min_f16,v_pk_max_f16,v_dot2c_f32_f16,v_pack_b32_f16,v_fmac_f16,v_fmamk_f16, andv_fmaak_f16.All inputs are exact binary16 values across four distinct edge-case lanes so results are exact across rounding modes and hardware drivers.
What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_packed_f16_fma_min_max_dot2c_and_pack: checksv_pk_fma_f16,v_pk_min_f16, andv_pk_max_f16(plain, swappedOP_SEL/OP_SEL_HI/OP_SEL_HI_2,NEG/NEG_HI, andCLAMP), two consecutivev_dot2c_f32_f16accumulations into the samevdst, and all fourOP_SEL[1:0]pairings ofv_pack_b32_f16.gpu_f16_fmac_fmamk_fmaak: checks VOP2v_fmac_f16, VOP3v_fmac_f16(OP_SEL=0b1010,CLAMP=1),v_fmamk_f16, andv_fmaak_f16(verifying upper-16-bit literal masking and preservation of the untouched half ofvdst).Tested
cargo test -p xcl --lib gpu_packed_f16 -- --nocapture: 1 passed, 0 failedcargo test -p xcl --lib gpu_f16_fmac -- --nocapture: 1 passed, 0 failed.\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 743 passed, 0 failed, 41 ignoredgpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64)python -I scripts/pr_check.py --localon this PR's description and changed files:description okRegression run
crates/xcl/src/gpu/recomp/tests.rs(test-only).Not tested
AI use
emit.rs/tests.rs, wrote both GPU tests and this PR description, and ran the test commands above.