Repository navigation
Conversation
lewisnic94-max
left a comment
There was a problem hiding this comment.
Independent review of 5623328.
All 128 GPU lane results matched the CPU reference across four execution masks on an RTX 3080.
No actionable defects identified within the reviewed scope. AMD and Intel hardware were not tested.
AI-assisted review and validation by Codex.
5623328 to
271b0da
Compare
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
entry_exec already initializes EXEC to all ones on full-wave compute and mesh shaders, and Lw::guarded already skips branches when its condition is constant 1, but lanebit/lanebit_at emitted (w >> lane31) & 1 != 0 without folding w == u32::MAX to true. - Fold constant 0 and u32::MAX masks in lanebit and lanebit_at (skipping the upper-half compare when hi == lo). - Fold Or(x, all_ones) => all_ones and same-operand integer identities in Lw::bin so s_or_saveexec -1 restores constant all-ones EXEC. - Add Lw::wr_if and lazy cur reads in VALU lowering so unconditional writes do not read dead old VGPR values. - Bump TRANSLATOR_VERSION from 7 to 8. Part of xcl-dev#1269.
271b0da to
e00963f
Compare
lewisnic94-max
left a comment
There was a problem hiding this comment.
Revalidated the EXEC-mask and accumulator changes at e00963fafdae4420f88333e7b2eb75d1ab9a994a against merge base 8e87fc7b62a87ea589ccb9ea6182f514016cf7db. The original four-mask wave32 test passed all 128 lane checks.
With runtime rounding toward +infinity, −infinity and zero, I compared 1,152 lane results for V_FMAC_F32, V_FMAC_LEGACY_F32 and V_MAC_F32. Every result matched the merge base bit for bit. Thirty active legacy FMAC results differed from the arithmetic reference on both builds. With input denormals preserved, the smallest positive subnormal times +infinity plus 1 returned 1.0. The reference expected +infinity. Native RDNA2 confirmation of that legacy case is still pending.
Head totals were 9 passed, 1 failed, 0 ignored and 0 skip notices. The merge base had 7 passed, 1 failed, 0 ignored and 0 skip notices. The failure was the same new legacy assertion. The five stock gpu::dxil::round_tests passed on both builds. Windows 11 build 26200.9974, Ryzen 7 5800X, RTX 3080 driver 616.92, Rust 1.100.0 MSVC, DXC 1.9.2602.17. The other head filters were batch002_dynamic_exec, full_wave_exec_folds, exec_folding_and_rmw, followup_directed_accumulator and followup_accumulator_readback_matrix. Coverage was limited to synthetic inputs on this adapter.
Codex (GPT-6) assisted with the test fixtures, GPU readbacks and comparison.
|
Focused Intel Arc regression run for exact head Tested
cargo +stable-x86_64-pc-windows-msvc test -j 2 -p xcl --lib gpu::dxil::core_tests::full_wave_exec_folds_away_lane_guards_and_dead_vgpr_reads -- --exact --nocapture
cargo +stable-x86_64-pc-windows-msvc test -j 2 -p xcl --lib gpu::dxil::core_tests::exec_folding_and_rmw_match_expected_on_gpu -- --exact --nocaptureEach command reported 1 passed, 0 failed, 0 ignored, 0 skip notices. The disassembly assertions checked full-wave guard folding and the retained accumulator load. The GPU test executed direct-translated DXIL and checked lane and memory readbacks for zero, half-active, restored and dynamically narrowed EXEC masks. D3D12 reported a wave lane range of 8–32 on this adapter, so the dispatch test exercised split wave64 and native wave32. Not tested
AI use
|
Direct DXIL
entry_execalready initializesEXECto all ones on full-wave compute and mesh shaders, andLw::guardedalready skips branches when its condition is constant1, butlanebit/lanebit_atemitted(w >> lane31) & 1 != 0without foldingw == u32::MAXtotrue, so full-wave lane guards and deadold/curVGPR reads were still emitted. Part of #1269.What is in it
crates/xcl/src/gpu/dxil/lanes.rs: fold constant0andu32::MAXmasks inlanebitandlanebit_at, and skip the upper-half compare inlanebit_atwhenhi == lo.crates/xcl/src/gpu/dxil/lower.rs: foldOr(x, mask) => maskand same-operand integer identities inLw::bin(sos_or_saveexec -1restores constant all-onesEXEC), and addLw::wr_ifto skip deadoldVGPR reads whencondis constant.crates/xcl/src/gpu/dxil/lower_valu.rs,lower_wide.rs,lower_gfx.rs,lower_image.rs: route guarded writes throughwr_ifand readcurlazily only in RMW instructions (includingvalu_f32_rmadded by Direct DXIL: geometry mode, MSAA loads and directed f32 rounding #1679).crates/xcl/src/gpu/dxil/kernel.rs: bumpTRANSLATOR_VERSIONfrom 7 to 8.crates/xcl/src/gpu/dxil/core_tests.rs: disassembly/validation and GPU tests (full_wave_exec_folds_away_lane_guards_and_dead_vgpr_reads,exec_folding_and_rmw_match_expected_on_gpu).Tested
32.0.16.2124), Intel Core i5-12450HX, 24 GB RAM, Windows 11 Pro (10.0.26300),rustc 1.100.0, Windows SDK10.0.26100.0(dxcompiler.dll/dxil.dll1.9.2602.17), debug tests + release sweep/smoke.XCL_ADAPTER="rtx 3050" cargo test --workspace -- --test-threads=4(rebased heade00963fonmain8e87fc7): 992 passed, 0 failed, 45 ignored (both new EXEC-folding tests and all upstreamcore_tests/round_tests/msaa_tests/geometry_testspassed).SKIPPEDGPU tests on this adapter (24): 19no wave64(gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,lower::tests::*,lower_dxil::tests::*wave64 arms), 3 per-lane wave32 unsupported f16/cvt arms (f16_programs_on_the_gpu,f32_programs_on_the_gpu), 1no heap windows(heap_window_out_of_memory_falls_back_to_the_switch_form), 10x887A002DDeveloper Mode required (pso_measurement_compiles_an_exact_synthetic_record).shaders.rpfsweep (xcl shaders <pack> --direct --validate --sample 500 --seed 1, release): 408/408 translated (100.0%: 33 CS, 11 GS, 155 MS, 164 PS, 45 VS), 0 validator errors, 0 panics (2.1 s).Regression run
(Note:
smoke.ps1runs withoutXCL_DIRECT_DXIL=1, so this regression check verifies no runtime regression on the default path and is not a gameplay FPS claim for the direct-DXIL optimization.)Not tested
XCL_HEAP_WINDOWS=1runtime runs,XCL_DIRECT_DXIL=1full title runs, andXCL_SAMPLE_*tests.AI use
8e87fc7(extending lazycurtovalu_f32_rmand bumpingTRANSLATOR_VERSIONto8), ran the workspace suite,--direct --validatesweep, andsmoke.ps1runs on this machine, and drafted this description.