Repository navigation
compute: lower DPP8 sources in the direct compute path - #3236
Conversation
DPP8 was decoded only for graphics, and only for quad-local selections. Direct compute now takes DPP8 (src0 233, and 234 with FI) on the VOP1/ VOP2 ops the DPP16 path accepts: lane L reads src0 from lane (L & ~7) | sel[L & 7] with waveReadLaneAt, within the 32-lane wave or the physical half of a split wave64. An inactive source lane gives zero unless FI is set (assumed rule: DPP8 has no BOUND_CTRL; checked against the test's CPU model only). Binary16 ops keep refusing DPP8. native_dpp8_hardware reads back min/add/max with the [4,5,6,7,0,1,2,3] swap, a mov with an asymmetric pattern, and sparse-EXEC add with and without FI and min without FI, against a CPU reference. AI-assisted.
R0Y00
left a comment
There was a problem hiding this comment.
Independent review of 2cd0089 on main e363374, tree 94bcbe0cf6a787b701e13706eb97ef039eb3d351. The eight-lane selector remains within one physical wave32. The FI behavior agrees with LLVM's AMDGPU DPP8 modifier reference. Binary16 remains refused.
Debug and Release /O2 each passed eight selected wave32, DPP16, SDWA and slot-67 checks with no skips. I independently repeated the seven DPP8 cases with source-built 64-thread groups, the slot-67 wave bit clear, distinct input words per lane and different low/high EXEC masks. Each case matched 128 result words and all guards in both configurations. The inactive-source zero and FI cases used 0x55555555 and 0xaa55cc33 in the two halves, so using the wrong EXEC half would fail. Windows 11 26200.9974, RTX 4060 Laptop 32.0.16.1656. These desktop readbacks exercise split guest wave64. They do not constitute console measurement.
ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^(native_dpp(8|_mirror|_row|_quad)_hardware|native_f16_alu_ir|native_slot67_wave_size_hardware|native_sdwa_f16_(ir|hardware))$'
Fixes #3235. Part of #2935. Target branch
main.Change (
src/gfx1013_compute_native.cpp,src/gfx1013_direct_compute.inl): direct compute accepts DPP8 sources (src0 233, and 234 with FI) on the VOP1/VOP2 operations its DPP16 path accepts.(L & ~7) | sel[L & 7]withwaveReadLaneAt, within the 32-lane wave, or within the physical half of a split wave64.tests/native_f16_alu_check.pynow expects "unsupported v_add_f16 DPP form" instead of the generic message. The case stays refused.Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, Release, on
main38129ba3plus this commit.native_dpp8_hardware(wave32 requests, two groups, eight guard words) reads back against a CPU reference:v_min,v_addandv_maxwith the[4,5,6,7,0,1,2,3]swap;v_addwith and without FI, and sparse-EXECv_minwithout FI.-R "dpp|native_f16|native_sdwa_f16|native_fma_f16|native_direct_container|native_wave|native_permlane".Measured with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests, onmain38129ba3and with this commit.maincompiles with the wave32 model until shader: read the wave size of slot 67 compute requests from .sa #3006. The DPP8 selection itself stays inside groups of eight lanes.AI-assisted.