compute: accept DPP16 on binary16 VOP2 add, sub, subrev and mul #3188
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3188"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T20:54:12Z.
Fixes #3167. Part of #2935. Target branch
main.Change (
src/gfx1013_compute_native.cpp,src/gfx1013_direct_compute.inl): direct compute accepts DPP16 on the binary16 VOP2 opsv_add_f16,v_sub_f16,v_subrev_f16andv_mul_f16.Tests. The setup was Windows 11 build 26300.9974 with an NVIDIA GeForce RTX 5080 (driver 32.0.16.2101) and DXC from the Windows SDK 10.0.26100, on
main80668b97plus this commit.native_f16_alu_hardwareadds four DPP16 cases under a sparse EXEC, against the exact binary16 reference intests/f16_packed_model.py:quad_perm:[1,0,3,2]with FI;row_shr:1without FI;native_f16_alu_ir, thenative_dpp*tests,native_sdwa_f16*,native_direct_containerandnative_permlane*pass.native_f16_alu_hardware:Measured on a local capture (counts and instruction shape only) with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requestsonmain80668b97.quad_perm:[1,0,3,2] row_mask:0xf bank_mask:0xf fi:1.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T21:15:00Z.
LGTM. The DPP16 support for binary16 VOP2 ops looks correct, particularly the handling of
dpp_controlvspermutedmodes in the f16 path. Given the large scope of this PR (infrastructure + shader features), I've focused on the core compute logic which appears sound and consistent with previous changes.\n\nNote: This PR is quite large. Ensure CI passes fully before merging.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T21:22:46Z.
Thanks. The size came from the old base (
80668b97). The branch is now rebased onmain5b145ca9(4e26c045), and the diff is the single f16 DPP16 change in 4 files: two insrc/, the f16 test and a two-line doc update. On the rebased tree, thenative_f16_alu*,native_dpp*,native_sdwa_f16*,native_direct_containerandnative_permlane*tests pass.native_cvt_f16_i16_hardwarefails as it does onmain; #3190 fixes it.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T22:13:05Z.
Review: APPROVED
I reviewed
ce002d89merged overmain6d690968. The merge is clean (tree97e61f4c) andgit diff --cached --checkis clean. The diff matches the four-file scope described in the last comment.What I traced.
binary16_alucovers onlyv_add_f16,v_sub_f16,v_subrev_f16andv_mul_f16. DPP16 decoding of these is limited to the direct profile; other paths still refuse.row_maskandbank_maskare accepted only for this half-precision path. LaneLin wave32 uses rowL >> 4(plus 2 for the upper half in split wave64) and bank(L >> 2) & 3. That matches the GFX10 DPP definition of a row as 16 lanes and a bank as 4 lanes within a row.bound_ctrl, an out-of-row or inactive source keeps the destination. WithBOUND_CTRL:0, the source reads 0.neg/absbits are decoded from their GFX10 DPP-word positions, and the high 16 bits of the destination are kept.What I ran. I built
compile_dxil native_store_replay native_compute_ir_dumpindevandrelease(plusoffscreen_checkinrelease), then ran/O2, with no skips.native_f16_alu_hardwarematched all 256 words of the DPP case, with the high halves kept.main886a5a28, the PR'snative_f16_alu_check.pyfails in both modes.irandgpustop at+0x60: unsupported v_add_f16 DPP form.Mutants in
src/gfx1013_direct_compute.inl. For each, I rebuilt indevand rannative_f16_alu_(ir|hardware):0xabcd3c00vs0xabcd3c02)row_maskignoredbank_maskignoredlane >> 3lane >> 3bound_ctrlignoredRestored and rebuilt afterwards;
git diff --quietis clean.Verdict: approve on
ce002d89.Environment: NVIDIA GeForce RTX 5090 driver 610.88, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Windows SDK 10.0.28000.0 DXC, Python 3.12.10, wave32, debug layer off.
CI:
Build and test on Windowspasses once002d89.This reply was AI-assisted.