direct compute: accept DPP16 on v_add_f16, v_sub_f16, v_subrev_f16 and v_mul_f16 #3167

Closed
opened 2026-11-27 19:49:30 +00:00 by Leyukaka · 0 comments
Leyukaka commented 2026-11-27 19:49:30 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T19:49:30Z.


Part of #2935 (instruction coverage). Target branch main. I am taking it.

Gap. Direct compute refuses any DPP16 source on the binary16 VOP2 ops v_add_f16, v_sub_f16, v_subrev_f16 and v_mul_f16, with "unsupported v_add_f16 DPP form" (and the other names). The 32-bit ALU ops already take DPP16.

Measured on a local capture of 2,689 compute requests (counts and instruction shape only), with compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests on main 80668b97:

  • 2 requests stop first there, both with v_add_f16_dpp ... quad_perm:[1,0,3,2] row_mask:0xf bank_mask:0xf fi:1.
  • One of them is dispatched in one start-up run, 3,500 times.
  • With the change, both pass and stop next at "SDWA binary16 source must be a VGPR", so the compiled count does not change yet.

Plan:

  • Fetch src0 through the existing DPP16 lane permutation, and let the f16 op read the low half of the permuted word.
  • FI, BOUND_CTRL and inactive source lanes follow the 32-bit DPP rules.
  • For these four ops, the row and bank masks gate the destination write.
  • DPP8 and clamp/omod stay refused.

Tests: a hardware readback against the exact binary16 reference, under a sparse EXEC:

  • quad_perm with FI;
  • row_shr:1 without FI;
  • a partial row mask;
  • a partial bank mask with BOUND_CTRL.

Measurement: the census and the run's requests, before and after.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6653499543 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3167). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-27T19:49:30Z. --- Part of #2935 (instruction coverage). Target branch `main`. I am taking it. **Gap.** Direct compute refuses any DPP16 source on the binary16 VOP2 ops `v_add_f16`, `v_sub_f16`, `v_subrev_f16` and `v_mul_f16`, with "unsupported v_add_f16 DPP form" (and the other names). The 32-bit ALU ops already take DPP16. **Measured** on a local capture of 2,689 compute requests (counts and instruction shape only), with `compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests` on `main` `80668b97`: - 2 requests stop first there, both with `v_add_f16_dpp ... quad_perm:[1,0,3,2] row_mask:0xf bank_mask:0xf fi:1`. - One of them is dispatched in one start-up run, 3,500 times. - With the change, both pass and stop next at "SDWA binary16 source must be a VGPR", so the compiled count does not change yet. **Plan:** - Fetch src0 through the existing DPP16 lane permutation, and let the f16 op read the low half of the permuted word. - FI, BOUND_CTRL and inactive source lanes follow the 32-bit DPP rules. - For these four ops, the row and bank masks gate the destination write. - DPP8 and clamp/omod stay refused. **Tests:** a hardware readback against the exact binary16 reference, under a sparse EXEC: - `quad_perm` with FI; - `row_shr:1` without FI; - a partial row mask; - a partial bank mask with BOUND_CTRL. **Measurement:** the census and the run's requests, before and after. AI-assisted.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#3167
No description provided.