tests: compute_store_aot_mac_f32_hardware fails on a GPU that fuses FMad, because DXC folds the constant word 0 unfused #2883
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#2883
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Not-Saii on GitHub · 2026-11-26 16:22 UTC · original
Commit or build
Fails on two builds whose test and lowering files match current main
b505c32b: #2864 at07222b46, and #2847 at0a627028, which mergesb505c32b. Both contain #2844 (3dfec4c1). The test passed on builds from before #2844.Summary
#2844 added
mac_f32_mad_fusion(). Before it checks the hardware mutation "fused mad() instead of unfused multiply+add", it requires the mutated shader's readback to match exactly one of two models, fused or unfused, across all 320 words. On a GPU that fusesFMadat run time, the readback matches neither, so the test fails:Cause
The two models differ at word 0 and at words 2, 4, 8, 10, … Word 0 is computed only from constants:
f32_mac(0x45800800u, 0x45800800u, 0xcb801000u), which is4097 * 4097 - 16785408. DXC folds thatmad()at compile time, and the folded value is the unfused result. In the DXIL of the mutated shader, only the two thread-dependent words remain as run-timeFMad, and word 0 is stored as the constant0:The GPU fuses the run-time
FMad, so the readback mixes the two models:word=2 expected=40400004 actual=40400003: the fused valueword=0 expected=3f800000 actual=00000000: the unfused, constant-folded valueThe unmutated shader still matches the unfused model exactly, so the translation itself is unaffected. Only the negative-control probe is wrong.
On the RX 5700 XT from #2730, the driver did not fuse the run-time
FMadeither, so the whole readback matched the unfused model. I expect any adapter that fusesFMadto fail this way with this DXC, but I tested only the one below.Environment
10de:2684), driver 610.88 (32.0.16.1088)dxcompiler.dll1.9.2602.17 (21d28f727), from Windows SDK 10.0.26100devpreset, hardware backend, debug layer enabled by the testReproduce
It fails when run alone. On the full suite it also failed under
-j 4, so this isn't contention.Expected
The probe classifies this adapter as
fused, so the strict "fused mad()" mutation check applies, as #2844 intended.Possible fixes
tid.x, so it stays a run-timeFMadlike the others.Either keeps the probe's intent: detect a fusing target, then require the mutation to be caught.