Repository navigation
Tests: verify direct DXIL vs HLSL parity for FLAT, GLOBAL, SCRATCH ops - #2143
Open
HumanlyDev wants to merge 1 commit into
Open
HumanlyDev wants to merge 1 commit into
HumanlyDev wants to merge 1 commit into
Conversation
Add GPU differential parity tests comparing the direct RDNA2 -> DXIL translator (validated with dxil.dll) against HLSL + DXC across wave32, split-wave64, and native wave64 (when supported) for GLOBAL, FLAT, and SCRATCH memory instructions. Assisted-by: Antigravity (Gemini 4)
|
A run with vkd3d-proton as the host D3D12: 2 of the 4 parity tests fail here. In both, the HLSL reference kernel does not finish, so the direct form is never compared. Tested
Not tested
AI use
|
|
Tested on the discrete RDNA4 card this PR lists as untested, and on native Windows with the same RTX 3060 as the vkd3d-proton run above: all 4 parity tests pass on both.
Head |
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
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.
Add GPU differential parity integration tests between the direct RDNA2 → DXIL translator (
xcl::gpu::dxil::kernel::translate_full, validated withdxil.dll) and HLSL + DXC (xcl::gpu::recomp) forGLOBAL,FLAT, andSCRATCHmemory instructions across wave32 and wave64 (split-wave64 on wave32-only GPUs). Test-only change undercrates/xcl/tests/; no runtime files modified.What is in it
crates/xcl/tests/gpu_dxil_flat_global_scratch_parity.rs(397 lines):direct_dxil_global_load_store_subdword_d16_and_saddr_parity:GLOBAL_{LOAD,STORE}_DWORD{,X2,X3,X4}(64-bitVADDRwithSADDR=0x7D, and 32-bitVADDR+ SGPRSADDRwith positive/negative signed 12-bit offsets),GLOBAL_{LOAD,STORE}_{BYTE,SHORT}/UBYTE/SBYTE/USHORT/SSHORT, all sixD16/D16_HIload variants preserving untouched 16-bit halves,GLOBAL_{LOAD,STORE}_DWORD_ADDTID, and divergentEXECmasking.direct_dxil_global_atomics_32_and_64_parity: 17 32-bitGLOBAL_ATOMIC_*ops (SWAP,CMPSWAP,ADD,SUB,SMIN,UMIN,SMAX,UMAX,AND,OR,XOR,INC,DEC,CSUB,FMIN,FMAX,FCMPSWAP) and 16 64-bitGLOBAL_ATOMIC_*_X2ops withGLC=1,SADDR+ negative offsets, CAS hit/miss (-0.0 == +0.0),INC/DEC/CSUBwrap/clamp, positive/negative floats, andEXECmasking.direct_dxil_flat_load_store_and_atomic_parity:FLAT_{LOAD,STORE}_DWORD{,X2,X3,X4}, sub-dword /D16/D16_HIops, 16 32-bit and 64-bitFLAT_ATOMIC_*ops withGLC=1, and divergentEXECload/store masking.direct_dxil_scratch_load_store_subdword_d16_and_exec_parity: per-laneSCRATCH_{LOAD,STORE}_DWORD{,X2,X3,X4}with both SGPRSADDRand per-laneADDR(SADDR=0x7D) + signed 12-bit offsets, sub-dword /D16/D16_HIops, andEXECmasking.Tested
32.0.16.1088) and AMD Radeon(TM) Graphics (driver32.0.21030.2001), AMD Ryzen 5 7600, Windows 11 Pro10.0.26200(build26200),rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.8.2502.11(Windows SDK10.0.26100.0), debug & release.cargo test -p xcl --test gpu_dxil_flat_global_scratch_parity -- --nocapture(RTX 4060, debug): 4 passed, 0 failed, 0 ignored (0 SKIPPED; each test ran wave32 + split-wave64 on both Direct DXIL and HLSL+DXC).XCL_ADAPTER=Radeon cargo test -p xcl --test gpu_dxil_flat_global_scratch_parity -- --nocapture(AMD Radeon(TM) Graphics, debug): 4 passed, 0 failed, 0 ignored (0 SKIPPED).XCL_D3D12_DEBUG=1 cargo test -p xcl --test gpu_dxil_flat_global_scratch_parity -- --test-threads=1 --nocapture(RTX 4060, debug): 4 passed, 0 failed, 0 ignored.XCL_ADAPTER=warp cargo test -p xcl --test gpu_dxil_flat_global_scratch_parity -- --nocapture(WARP, debug): 4 passed, 0 failed, 0 ignored (4 SKIPPED:no wave64).cargo test --release -p xcl --test gpu_dxil_flat_global_scratch_parity -- --nocapture(RTX 4060, release): 4 passed, 0 failed, 0 ignored (0 SKIPPED)..\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4, RTX 4060, debug): 1158 passed, 0 failed, 46 ignored across 22 test targets (25 SKIPPED GPU checks: 20no wave64, 3per-lane form#1426refusals, 1no heap windows, 1cannot disable the driver cache (Windows Developer Mode is required)).Regression run
crates/xcl/tests/(no runtime files undercrates/xcl/src/modified).Not tested
scripts/smoke.ps1) andXCL_SAMPLE_*tests (no retail game files or sample paths on this machine).XCL_HEAP_WINDOWS=1/ multi-window UMA arenas.AI use
lower_mem.rs,emit.rs,rdna2_spec.rs, andrunner.rs, wrotecrates/xcl/tests/gpu_dxil_flat_global_scratch_parity.rs, ran the test suites listed above on local hardware, and drafted this PR description.