direct compute: SDWA forms of v_cvt_pkrtz_f16_f32 and v_add_co_ci_u32 #3183

Closed
opened 2026-11-27 20:39:54 +00:00 by Leyukaka · 0 comments
Leyukaka commented 2026-11-27 20:39:54 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T20:39:54Z.


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

Gap. v_cvt_pkrtz_f16_f32 and v_add_co_ci_u32 already have direct lowerings, but they are missing from the SDWA operand profiles. Their SDWA forms are refused with "unimplemented direct SDWA operand profile".

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, baseline main 6057071b, change on a5dad843 (the commits in between do not touch the two native source files):

  • v_cvt_pkrtz_f16_f32_sdwa ... dst_sel:WORD_0 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD: 9 requests.
  • v_add_co_ci_u32_sdwa with dst_sel WORD_1 or DWORD: 3 requests.
  • With the change, 1 of the 12 compiles (403 to 404), and none that compiled before stops.

Plan:

  • v_add_co_ci_u32 takes the SDWA source selections. It writes its carry to VCC from the selected operands, as the VOP2 form does, and places the result per dst_sel/dst_unused.
  • v_cvt_pkrtz_f16_f32 takes full f32 sources (src_sel DWORD only; other selections stay refused) and places the packed result.
  • Graphics, clamp and omod stay refused.

Tests: a hardware readback of both ops in several destination placements, including the carry in VCC.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6654134523 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3183). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-27T20:39:54Z. --- Part of #2935 (instruction coverage). Target branch `main`. I am taking it. **Gap.** `v_cvt_pkrtz_f16_f32` and `v_add_co_ci_u32` already have direct lowerings, but they are missing from the SDWA operand profiles. Their SDWA forms are refused with "unimplemented direct SDWA operand profile". **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`, baseline `main` `6057071b`, change on `a5dad843` (the commits in between do not touch the two native source files): - `v_cvt_pkrtz_f16_f32_sdwa ... dst_sel:WORD_0 dst_unused:UNUSED_PAD src0_sel:DWORD src1_sel:DWORD`: 9 requests. - `v_add_co_ci_u32_sdwa` with dst_sel WORD_1 or DWORD: 3 requests. - With the change, 1 of the 12 compiles (403 to 404), and none that compiled before stops. **Plan:** - `v_add_co_ci_u32` takes the SDWA source selections. It writes its carry to VCC from the selected operands, as the VOP2 form does, and places the result per dst_sel/dst_unused. - `v_cvt_pkrtz_f16_f32` takes full f32 sources (src_sel DWORD only; other selections stay refused) and places the packed result. - Graphics, clamp and omod stay refused. **Tests:** a hardware readback of both ops in several destination placements, including the carry in VCC. 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#3183
No description provided.