Skip to content

compute: lower DPP8 sources in the direct compute path - #3236

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:dpp8-compute
Nov 28, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
Leyukaka:dpp8-compute

Conversation

@Leyukaka

Copy link
Copy Markdown
Collaborator

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.

  • Lane L reads src0 from lane (L & ~7) | sel[L & 7] with waveReadLaneAt, within the 32-lane wave, or within the physical half of a split wave64.
  • An inactive source lane reads zero unless FI is set. DPP8 has no BOUND_CTRL. This zero is the assumed rule, checked only against the test's CPU model.
  • Binary16 operations still refuse DPP8. The f16 refusal control in tests/native_f16_alu_check.py now 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 main 38129ba3 plus this commit.

  • New native_dpp8_hardware (wave32 requests, two groups, eight guard words) reads back against a CPU reference:
    • v_min, v_add and v_max with the [4,5,6,7,0,1,2,3] swap;
    • a move with an asymmetric pattern;
    • sparse-EXEC v_add with and without FI, and sparse-EXEC v_min without FI.
  • 41 tests pass with -R "dpp|native_f16|native_sdwa_f16|native_fma_f16|native_direct_container|native_wave|native_permlane".
  • The test covers wave32 only. The wave64 split path uses the same per-half selection, but no wave64 readback covers it here.

Measured with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests, on main 38129ba3 and with this commit.

AI-assisted.

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 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))$'

@R0Y00
R0Y00 merged commit 8007a53 into R0Y00:main Nov 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

direct compute: lower DPP8 sources

2 participants