Repository navigation
Tests: verify 64-bit typed IMAGE_ATOMIC_* direct DXIL ops on the GPU - #2488
microwave805 wants to merge 1 commit into
Conversation
PR xcl-dev#1948 added SM 6.6 64-bit typed `IMAGE_ATOMIC_*` lowering in `gpu/dxil/lower_image.rs` (`mimg_atomic64`, `texel_cas64`, `texel_fcas64`), previously covered only by DXIL validation in `ops_tests::direct_image_atomic_64bit_validates`. Adds `crates/xcl/tests/gpu_image_atomic64_e2e.rs` (Part of xcl-dev#1269) executing all 16 64-bit typed ops on `DXGI_FORMAT_R32G32_UINT` `Texture2D` and `Texture2DArray` UAVs in both wave32 and wave64 (native or split) kernels: - Contended 64-bit `ADD`, `SUB`, `AND`, `OR`, `XOR`, `UMIN`, `UMAX`, `SMIN`, `SMAX`, and `SWAP` across 32-bit carry/borrow boundaries and signed vs unsigned ordering, checking `GLC=1` returned old-value histories, `GLC=0` non-clobbering, and `EXEC=0` lane preservation. - 64-bit CAS-loop `INC`, `DEC` (carry/borrow and threshold wraparound), and `FMIN`/`FMAX` (`f64` values beyond `f32` range plus `NaN`). - 64-bit `CMPSWAP` vs `FCMPSWAP` (`DMASK=0xF`) across IEEE-754 edge cases (`-0.0 == +0.0`, `qNaN`, `sNaN`, subnormal, `-inf`, high-32-bit mismatch) plus a 32-bit `IMAGE_ATOMIC_CMPSWAP` (`DMASK=0x3`) control. - Skips via `runner::skip_test` when the adapter lacks SM 6.6 64-bit typed or descriptor-heap integer atomics (`OPTIONS9` / `OPTIONS11`). Assisted-by: Antigravity (Gemini 4 Neon)
|
Focused AMD verification of exact PR head Tested
Not tested
AI use
|
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
|
|
Native wave64 run (listed as untested), plus an RTX 3060: all 3 new tests pass on both cards, with no skips. Diff applied on
Not tested: |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Test report from Linux + Wine on AMD RADV. As far as I can see these tests have only been run on native Windows drivers so far; this is the Wine lane, where the DXIL goes through vkd3d-proton and dxil-spirv before the AMD Vulkan driver. Prepared with AI assistance (DeepSeek V4.1 Flash in OpenCode ran the commands and wrote this); no code was written or changed. Setup
Result — two runs, identical: There is no As a check that the GPU really executed them, a run with Not tested
|
Part of #1269
PR #1948 added SM 6.6 64-bit typed
IMAGE_ATOMIC_*lowering ingpu/dxil/lower_image.rs(mimg_atomic64,texel_cas64,texel_fcas64), which was previously checked only by DXIL validation (ops_tests::direct_image_atomic_64bit_validates) without executing on a GPU.What is in it
crates/xcl/tests/gpu_image_atomic64_e2e.rswith three end-to-end GPU tests running all 16 64-bit typedMIMGatomic ops onDXGI_FORMAT_R32G32_UINTTexture2DandTexture2DArrayUAVs in both wave32 and wave64 (native or split) kernels:gpu_image_atomic64_integer_and_bitwise_ops_on_d2_and_d2array: contended 64-bitADD,SUB,AND,OR,XOR,UMIN,UMAX,SMIN,SMAX, andSWAPacross 32-bit carry/borrow boundaries and signed vs unsigned ordering, checkingGLC=1returned old-value histories,GLC=0non-clobbering, andEXEC=0inactive-lane preservation.gpu_image_atomic64_inc_dec_and_fmin_fmax_cas_loops: 64-bit CAS-loopINC,DEC(64-bit carry/borrow and threshold wraparound), andFMIN/FMAX(f64values beyondf32range plusNaN).gpu_image_atomic64_cmpswap_fcmpswap_and_32bit_control: 64-bitCMPSWAPvsFCMPSWAP(DMASK=0xF) across IEEE-754 edge cases (-0.0 == +0.0,qNaN,sNaN, subnormal,-inf, high-32-bit mismatch), plus a 32-bitIMAGE_ATOMIC_CMPSWAP(DMASK=0x3) regression control.D3D12_OPTIONS9::AtomicInt64OnTypedResourceSupportedandD3D12_OPTIONS11::AtomicInt64OnDescriptorHeapResourceSupported, callingrunner::skip_testcleanly when unsupported.Tested
32.0.16.1742, wave32 + SM 6.6 + 64-bit typed/heap integer atomics, no native wave64), DXC1.9.2602.17(Windows SDK10.0.26100.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), debug profile, tested on commit2e5d510baa78.cargo test -p xcl --test gpu_image_atomic64_e2e -- --nocapture: 3 passed, 0 failed, 0 ignored (also verified withXCL_D3D12_DEBUG=1: 3 passed, 0 D3D12 debug layer errors)..\scripts\test.ps1(withXCL_DXIL_CACHE=%TEMP%\xcl-test-dxil-cache): 1420 passed, 0 failed, 46 ignored (26SKIPPEDlines on this adapter: 21no wave64, 3 per-lane wave32 unsupported-op skips, 1no heap windows, 1cannot disable the driver cache (Windows Developer Mode is required)).Regression run
Not needed: test-only change under
crates/xcl/tests/(no runtime files modified).Not tested
OPTIONS9/OPTIONS1164-bit typed heap atomics.XCL_SAMPLE_*game-data tests (no unpacked Xbox Series game files available).AI use
Gemini 4 Neon).crates/xcl/tests/gpu_image_atomic64_e2e.rs, ran the targeted (with and withoutXCL_D3D12_DEBUG=1) and full workspace test suites on commit2e5d510baa78, and drafted this PR description.