Repository navigation
[upstream #1778] Tests: verify direct DXIL vs HLSL GPU parity for wave, LDS atomic, and MIMG ops - #356
Open
ufoptg wants to merge 1 commit into
Open
[upstream #1778] Tests: verify direct DXIL vs HLSL GPU parity for wave, LDS atomic, and MIMG ops#356ufoptg wants to merge 1 commit into
ufoptg wants to merge 1 commit into
Conversation
…d MIMG ops Add integration test crates/xcl/tests/gpu_dxil_parity.rs comparing the direct RDNA2 -> DXIL translator against HLSL + DXC on the GPU across native wave64, split wave64, and wave32: - direct_dxil_cross_lane_and_dpp_parity: v_readlane_b32 (low/high half), v_readfirstlane_b32 (under divergent EXEC), v_writelane_b32, ds_swizzle_b32 (quad reverse and XOR-1), ds_bpermute_b32, v_permlane16_b32 (default and FI/BC), v_permlanex16_b32, and VOP1_VOP_DPP16 / VOP1_VOP_DPP8. - direct_dxil_lds_atomics_and_barrier_parity: per-lane and multi-lane contention LDS atomics (add, sub, and, or, xor, umin/umax, smin/smax, wrxchg, cmpst, inc, dec), s_barrier, and divergent EXEC masking. - direct_dxil_mimg_image_ops_and_atomics_parity: image_load, image_store, image_gather4_lz, and 32-bit image_atomic_* (add, sub, and, or, xor, swap GLC=1/0, inc, dec, cmpswap, smin, smax, contention) checking both VGPRs and UAV texture readbacks byte-for-byte. Assisted-by: Antigravity (Gemini 4 Neon)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds GPU differential parity tests between the direct RDNA2 → DXIL translator (
xcl::gpu::dxil::kernel) and the HLSL + DXC path (xcl::gpu::recomp) across native wave64, split wave64, and wave32. Covers cross-lane/DPP wave ops, LDS atomics + barriers, and MIMG texture ops + 32-bit image atomics. No runtime or recompiler source files are changed.What is in it
crates/xcl/tests/gpu_dxil_parity.rs(new integration test, 333 lines):direct_dxil_cross_lane_and_dpp_parity: asserts bit-exact SGPR/VGPR parity between direct DXIL (validated bydxil.dll) and HLSL+DXC forv_readlane_b32(low and high half),v_readfirstlane_b32under divergentEXEC,v_writelane_b32,ds_swizzle_b32(quad reverse and XOR-1),ds_bpermute_b32,v_permlane16_b32(default andFI/BC),v_permlanex16_b32, andVOP1_VOP_DPP16/VOP1_VOP_DPP8.direct_dxil_lds_atomics_and_barrier_parity: asserts bit-exact VGPR parity for per-lane and multi-lane contention LDS atomics (add,sub,and,or,xor,umin/umax,smin/smax,wrxchg,cmpst,inc,dec),s_barrier, and divergentEXECmasking.direct_dxil_mimg_image_ops_and_atomics_parity: asserts bit-exact VGPR and UAV texture readback parity forimage_load,image_store,image_gather4_lz, and 32-bitimage_atomic_*(add,sub,and,or,xor,swapGLC=1/0,inc,dec,cmpswap,smin,smax, and 1×1 contention).Tested
32.0.21045.29003;XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test -p xcl --test gpu_dxil_parity -- --nocapture: 3 passed, 0 failed, 0 ignored (0.45s; native wave64, split wave64, and wave32 all executed on hardware).XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 889 passed, 3 failed, 42 ignored.main(b9b6ea6) on this RX 6600 (placed_title_textures_share_vram_and_preserve_pixels: 3D mip subresource mismatch, plus 2 mutex-poison cascadestransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory; tracked by D3D12.X: map and unmap 3D texture mips separately xcl-dev/xcl#1028).SKIPPED(not counted as coverage):heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows,shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (0x887A002D)(plus D3D12 debug-layer tests skip becaused3d12SDKLayers.dllis not installed).Not tested
AI use
crates/xcl/tests/gpu_dxil_parity.rs, ran the targeted and full workspace test suites on my RX 6600, and drafted this PR description; I reviewed the diff and test output before opening the PR.Mirror of xcl-dev#1778 (auto-synced, do not edit).