compute_store_aot: handle unobserved gfx1013 FLAT_SCR_LO writes #1648
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#1648
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?
@stan495 on GitHub · 2026-11-24 15:51 UTC · original
Refs #721 and #640.
On
cb94b8caff25ed8d946e040167265263bc1cb8b5, the source-built gfx1013INDEXEDfixture lowers to HLSL and compiles with DXC. Prepending a whole-registerFLAT_SCR_LOwrite makescompute_store_aotreject the same kernel, even though the kernel never reads the register or accesses scratch memory.Reproduction
INDEXEDfromtests/compute_store_check.py. Create a second copy withs_setreg_imm32_b32 hwreg(HW_REG_FLAT_SCR_LO), 0as its first instruction.assemble()helper. Wrap each.textbinary withstore_container(code, (32, 1, 1))and save the results asout/control.dxbcandout/write-only.dxbc.LLVM_LIBset to your LLVM shared library. The reproduction used AMD LLVM 22.0.0git for assembly and LLVM 17.0.6 for decoding.The control emits HLSL and compiles with
dxc -Gis -T cs_6_0 -E main. The write-only variant exits with code 1 before emitting HLSL.Fixed-profile rescan
At the same commit, 13 of 2,689 local compute records generated HLSL across the configured profiles. Among the rejected records, this exact write was the first diagnostic on the first fixed profile for 389 records. A rescan after the change would measure how many reach HLSL generation.
Proposed acceptance criteria
FLAT_SCR_LOwiths_getreg_b32and uses the value in the UAV store. Keep rejecting memory forms that depend on the scratch base until their addressing semantics are modeled.@R0Y00 on GitHub · 2026-11-24 16:05 UTC · original
The source-built comparison is a good starting point. A focused change can handle the exact whole-register immediate write if the accepted program cannot observe scratch state. Please keep direct reads, scratch-dependent memory operations and unmodeled forms refused, and compare the untouched UAV guards as well as the output. If part of the existing lowering can observe the register implicitly, keep the write rejected on that path. Report any offline acceptance-count change separately from GPU readback.
@triggered02 on GitHub · 2026-11-24 16:09 UTC · original
Taking this, per the scope you set: handle the exact whole-register immediate write when the accepted program cannot observe scratch state, keep direct reads and scratch-dependent memory refused, and compare the untouched UAV guards as well as the output.
Where I will start.
compute_store_aot_warppasses on this machine (8.66 s, WARP, dxc from the Windows SDK), so the readback comparison is runnable offline here. I will add the write-only kernel alongside the existingINDEXEDfixture, confirm the guard words and the UAV words match the untouched run, and keep two refusals pinned:s_getreg_b32ofFLAT_SCR_LOwhose value reaches a store, and a memory form whose addressing depends on the scratch base.What I will not claim. The offline acceptance-count rescan (389 of 2,689 records hitting this diagnostic) depends on the local record set, which I do not have; if I cannot reproduce that count I will report it as not measured rather than estimating it from the unit fixture.