direct compute: SDWA forms of v_cvt_pkrtz_f16_f32 and v_add_co_ci_u32 #3185

Closed
opened 2026-11-27 20:40:54 +00:00 by github-bot · 0 comments
Owner

@⁠Leyukaka on GitHub · 2026-11-27 20:39 UTC · original

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.

**@⁠Leyukaka** on GitHub · 2026-11-27 20:39 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3183) 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:40:54 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3185
No description provided.