Repository navigation
Recompiler: lower S_FF0_I32 and S_FLBIT_I32 on mask registers in the per-lane form - #1865
Conversation
|
NVIDIA test report for Tested
Regression run ( base ( this PR: Not tested: this code in the title: it is on the opt-in direct-DXIL path ( AI use: Claude Code (Claude Opus 5.5) built and ran the tests and smoke runs on my machine and wrote this report; I checked it. |
|
NVIDIA counterpart to the RX 9060 XT run: RTX 3070 8 GB (32-lane waves, no native wave64), driver 616.56, Windows 11, debug,
AI-assisted (Claude Code). Synthetic tests only. |
…per-lane form `wave_salu` in the per-lane direct DXIL backend (xcl-dev#1745) handled `S_BCNT1`, `S_BCNT0`, and `S_FF1` on mask registers, but `S_FF0_I32_B32/B64` and `S_FLBIT_I32_B32/B64` fell through to `bridge()` and failed with `"a mask read as a number"`. `wave_salu` now lowers `S_FF0_I32_B32/B64` via `first_set` on the inverted mask words and `S_FLBIT_I32_B32/B64` via leading-zero count (returning `0xFFFFFFFF` when the input is 0, matching `emit.rs` and the RDNA2 ISA). Assisted-by: Antigravity (Gemini 4 Neon)
|
Both AMD and NVIDIA verification look good on |
dfddc79 to
2c1102d
Compare
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
wave_saluin the per-lane direct DXIL backend (#1745) loweredS_BCNT1,S_BCNT0, andS_FF1on mask registers, butS_FF0_I32_B32,S_FF0_I32_B64,S_FLBIT_I32_B32, andS_FLBIT_I32_B64fell through tobridge()and failed with"a mask read as a number". Part of #1269.wave_salunow lowersS_FF0_I32_B32/B64viafirst_seton the inverted mask words andS_FLBIT_I32_B32/B64via leading-zero count (returning0xFFFFFFFFwhen the input is 0, matchingemit.rsand the RDNA2 ISA).What is in it
crates/xcl/src/gpu/recomp/lower/wave.rs: addclz32helper and handleS_FF0_I32_B32/B64andS_FLBIT_I32_B32/B64inwave_salu.crates/xcl/src/gpu/recomp/lower_dxil.rs: GPU parity testmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(wave32 and wave64 across partial, all-ones, and all-zeros masks, plus B32 onEXEC).Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on 2c1102d (rebased ontomainde36462): 1003 passed, 2 failed, 45 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodifiedmainde36462on this GPU (seeds 722 and 1599).mask_ff0_and_flbit_agree_with_hlsl_on_the_gpubefore the change failed (wave32: unsupported S_FF0_I32_B32 (s106: a mask read as a number)); passes on both wave32 and native wave64 afterRegression run
main:
this PR:
Not tested
WaveSize(32)) GPUs (NVIDIA / Intel / wave32-only).AI use
mainde36462(a conflict in the tests ofcrates/xcl/src/gpu/recomp/lower_dxil.rs; both tests kept) and reran the suite and smoke runs above.