compute: lower op_sel on VOP3 v_fma_f16 in direct compute #3236
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3236
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3234"
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?
@Leyukaka on GitHub · 2026-11-28 00:14 UTC · original
Leyukaka:fma-f16-opsel→main· +130 −7 · 5 files · 1 commits · merged 2026-11-28 01:07 UTCFixes #3235. Part of #2935. Target branch
main.Change (
src/gfx1013_direct_compute.inl, the binary16 FMA lowering inDirectCompute::float_alu): VOP3v_fma_f16acceptsop_sel.op_sel: "the last value controls destination", 0 selects the low bits and 1 the high bits). That page does not say what happens to the other destination half. Keeping it mirrors whatmainalready does for the low-half write. I have not measured it on console hardware.op_selon an SGPR or constant source, with the new message "unsupported v_fma_f16 high-half op_sel on non-VGPR source";op_selwith clamp;v_fmac_f16withop_sel;tests/native_fma_f16_check.py: the one refusal control that used a VGPR source selection now uses an inline-constant source, which stays refused.Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, on
main14d56502plus this commit.native_fma_f16_opsel_irandnative_fma_f16_opsel_hardware(wave32 request, groups 0 and 1, EXEC set before the per-lane setup) cover the seven forms found in the captured requests.0xABCD1234, so a wrong destination half also changes the kept half.tests/f16_packed_model.py:0xABCD4980,0xABCD4880,0xABCD4A80,0x4E001234,0x4D001234,0x4CC01234and0x45001234.v_fmac_f16DPP, and clamp withop_sel.main'snative_compute_ir_dump, the new test fails with "unsupported v_fma_f16 high-half op_sel".-R "native_fma_f16|native_f16|native_sdwa_f16|native_packed|native_cvt_f16|native_direct_container".Measured with
compile_dxil --jobs 8 gfx1013-direct-cs@36 --requests, onmain14d56502and with this commit.AI-assisted.
@R0Y00 on GitHub · 2026-11-28 01:07 UTC · original · approved these changes
Independent review of
728b5fe057integrated over main7364e6a9, treea63cbe9566. The VOP3 selector reads the requested VGPR halves before abs/neg and preserves the other destination half. The three refusal cases still reject selected non-VGPR operands, DPP on FMAC and clamp on the new op_sel path. The replay checks 14 exact result words across two groups and all guards.Debug and Release /O2 each passed all nine tested entries, including the existing packed F16 and slot-67 wave-size checks. Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656. No skips. Main has since added #3231's runtime-only output diagnostics and its fixture, outside the compiler and standalone replay inputs tested here.