Repository navigation
shader: lower gfx1013 buffer_atomic_add, umax and cmpswap - #1684
Conversation
tedin7
left a comment
There was a problem hiding this comment.
Review of head 0c1c7e2df57582de7a04a471352dee0113b49721.
Linux limits. Linux x86_64, llvm-mc-19 / llvm-objcopy-19 (CI pins 15), Python 3.14. No Windows, no DXC, no GPU, so I could NOT run --draw (the ctest compute_store_aot_gfx1013_buffer_atomics_<adapter>). Old-value return, contended-add serialization and the HLSL semantics were not executed.
Scope. The title says DWORD buffer atomics, but the gfx1013 path accepts only add, umax and cmpswap (32-bit). sub, smin, umin, smax, and, or, xor, swap, inc, dec, csub and all _x2 forms are refused with gfx1013 buffer atomics require 32-bit add, umax or cmpswap. The README row and docs name add, umax and cmpswap, so this is consistent, but the title reads wider.
What I ran
python3 -B tests/compute_buffer_atomics_check.py(controls plus lowering of the 5 cases): passes.--binary llvm-mc-19 llvm-objcopy-19 --llvm /usr/lib/llvm-19/lib/libLLVM-19.so:add_offen,umax_idxen,umax_no_glc,shared_addpass.cmpswapfails: the hard-coded words differ in 2 bytes of the filler src2 field of twov_mul_lo_u32-style VOP3 words (...0102expected,...0100from llvm-19). The atomic words themselves (0060c4e0 00040680etc.) match. So this is an assembler-version pin, harmless with the CI's llvm-15, but the check is brittle on other LLVM versions.- Mutations on
tools/compute_store_aot.py, each followed by the no-argument check, restored withgit checkout -- .:- cmpswap operand order swapped (
f"{word}, {operands[1]}"): check STILL PASSED. - glc ignored (
result = "ignoredAtomic", so the old value is not returned): check STILL PASSED. - guard refusal removed (
s_and_saveexec_b32after an atomic): check STILL PASSED. - overlap guard removed (
Return record can overlap the fixed atomic address): FAILED, as intended. - extra op (
or) let through the allow list: FAILED, as intended.
- cmpswap operand order swapped (
Findings
- The three surviving mutations are semantic ones the Linux run cannot see: the cmpswap compare/replace order, the old-value return with
glc, and the guard. They are guarded only by--drawon a Windows GPU. The ISA order itself (replacement in VDATA, compare in VDATA+1, HLSL compare first) is what the code does, andllvm-mc-19acceptsbuffer_atomic_cmpswap v[4:5], v0, s[24:27], 0 idxen glc. A text-level assertion on the emittedInterlockedCompareExchangeargument order and onatomicOldwould make the Linux CI step meaningful. - Without
glcthe data register is popped fromvector, so a consumer of it is refused (Store data is not a known wordcontrol). That is the safe choice. - Workflow wiring (
windows.ymlCHECKS entry with the explicit--binary llvm-mc-15 llvm-objcopy-15 --llvm libLLVM-15.so.1, the no-argument step,AGENTS.md) looks consistent with its neighbours; I did not run Actions.
Verdict: the accepted shapes assemble to the expected machine words, and the refusals are tight. The ordering and old-value semantics rest on Windows-only draws. Not approving.
AI-assisted; commands listed were executed locally.
|
Thanks @tedin7. Both points are addressed in the latest commit:
The Windows draws are unchanged from the description: Debug and Release on a GTX 1060 and WARP. |
tedin7
left a comment
There was a problem hiding this comment.
Re-review of head a34997b (comment only, not an approval). My earlier review was at 0c1c7e2.
Verdict: 0 P1 / 0 P2.
Earlier points
- Fixed: the cmpswap fixture's two
v_mul_lo_u32words now end in...0100; llvm-mc-19--binarypasses all 5 cases (llvm 15 not run). - Fixed: new assertions pin
InterlockedCompareExchange(addr, compare, replacement, atomicOld),InterlockedAdd(..., atomicOld)plus the store,ignoredAtomicwithoutatomicOldfor the non-glc case, and two rejections for a lane guard before and after the atomic. I re-ran my earlier cmpswap-order and glc mutations and both now fail. The title now names add, umax and cmpswap.
Semantics: the replacement is in VDATA (v4) and the compare in VDATA+1 (v5), HLSL gets the compare first, matching the .s file. With glc the old value goes to the first data VGPR, gated by vmcnt(0) through loading[src]. llvm-mc-19 on gfx1013 and gfx1030 gives identical bytes (cmpswap opcode 49, add 50, umax 56). signed is true only for smin/smax, so umax is unsigned. off, idxen and offen go through linear_uav_address. The three opcodes are already in docs/coverage/gfx1013.tsv and rdna2.tsv. No assertion is weakened; the one loosened line only lets gfx1013 follow an atomic with a plain DWORD store, which is the record store.
Run
python3 -B tests/compute_buffer_atomics_check.py: controls passed. The same with--binary llvm-mc-19 llvm-objcopy-19 --llvm /usr/lib/llvm-19/lib/libLLVM-19.so: all 5 cases match (machine words, disassembly round trip, container CLI).tests/compute_store_check.py binary ...(no gfx1030 regression), compute_entry_layout_check, run_checks_parallel_check, docs_links_check (17 files, 364 links), bidi_controls_check,git diff --check origin/main...HEAD: pass.- Mutations in tools/compute_store_aot.py (restored with
git checkout --, green again), caught: cmpswap operands swapped; glc ignored; guard-before refusal removed; return VGPR readable before the wait; offen wrap bound<< 40. - NOT caught on Linux: umax treated as signed; umax mapped to
Min; per-thread address offset dropped (+ 0u; every atomic fixture uses offset 0, so it is untested even with--draw).
Non-blocking
- Pin the umax HLSL the way the cmpswap and add text pins do (
uinttype andInterlockedMaxinlowered["umax_idxen"], andlowered["umax_no_glc"]beyondignoredAtomic);), so signedness and the Max/Min mapping do not rest only on a Windows draw. - Give one atomic fixture a nonzero
offset:. - The new ctest has no
FORM_COVERAGE_RECORD, unlikecompute_store_aot_mubuf_reduction_*; the neighbouring gfx1013_image_store test omits it too, so optional. - The PR body's control list still says "Add shift that wraps within a group"; it matches the
<< 31control.
Not run: --draw (ctest compute_store_aot_gfx1013_buffer_atomics_*), so the contended-add serialization, the hit/miss readbacks and the 85-pass claim are unconfirmed here.
Linux limits: no Windows, WARP or GPU here; LLVM 19 only (CI pins LLVM 15). Anything that needs them was not run.
AI-assisted; commands listed were executed locally.
|
Thanks @tedin7. The non-blocking points are in
This commit also merges main at |
|
The Windows job failure at The failure is a timing edge in the timeout case: the process was killed by the 1 s timeout at the same moment the fast-fail check compared its run time against 1.0 s ( On the same merged tree, |
tedin7
left a comment
There was a problem hiding this comment.
Review of head c34d584dd163e8751974e82018945c73e2eb98d3. My earlier reviews were on 0c1c7e2d and a34997b9; since then the PR added a823f6d4 (umax and nonzero-offset pins, form-coverage record) and c34d584d (a comment), plus a main merge.
Verdict: no P1 and no P2. The lowering matches the RDNA 2 atomic semantics as I read them, and the new pins hold.
Linux limits. Linux x86_64, llvm-mc-19 and llvm-objcopy-19 (CI pins 15), Python 3. No Windows, no DXC, no GPU, and I did not run the pipeline's Windows helper. So I did not run --draw (compute_store_aot_gfx1013_buffer_atomics_<adapter>): the contended-add serialization, the returned old values and the compare-swap hit and miss counts are the author's GTX 1060 and WARP results, not reproduced by me. Those draws ran at 85271d0e; the PR text says later commits only changed the test file and CMake, and git diff 8cef962c HEAD agrees for the lowering except one added comment (tools/compute_store_aot.py:1586-1589).
Semantics I checked (tools/compute_store_aot.py)
- cmpswap: the ISA takes the replacement in VDATA and the compare in VDATA+1 and returns the old value in VDATA when glc is set; the lowering emits compare first, then replacement (
word = f"{operands[1]}, {word}"), the HLSLInterlockedCompareExchangeorder. With glc the first data VGPR is set fromloading[src]and only readable aftervmcnt(0); the compare register keeps its value. - Non-glc forms write
ignoredAtomicand pop the first data VGPR, so a later read of it is refused instead of invented. offen/idxengo throughlinear_uav_address(:254-266): the shift is bounded anddims[axis] << shiftcannot pass 2^32, the field must fit the element, and every other group axis must be 1. A sharedoffatomic setsshared_atomic_offset, and a later record must be per-thread and start above it, so a record cannot land on the shared word for any lane.- gfx1013 refuses 64-bit forms, a guard before or after the atomic, an image binding, and a second atomic. Plain
buffer_store_dwordafter the atomic is the only store allowed (buffer_store_dwordx2and the others are still refused).
What I ran on this head (worktree at the exact SHA; git status clean after every mutation)
python3 -B tests/compute_buffer_atomics_check.py: passes.... --binary llvm-mc-19 llvm-objcopy-19 --llvm /usr/lib/llvm-19/lib/libLLVM-19.so: all five cases (add_offen, umax_idxen, umax_no_glc, shared_add, cmpswap) match llvm-mc.python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so(the CI entry for the translator as a whole): exit 0, so the shared lowering still passes its existing cases.git merge-tree --write-tree origin/main HEAD: clean; also clean against #1649.git diff --check origin/main...HEAD,docs_links_check.py(17 files, 366 links),bidi_controls_check.py: clean.- Mutations of
tools/compute_store_aot.py, each restored:
| Mutation | controls |
|---|---|
| cmpswap compare/replacement order swapped | fail |
glc return dropped (always ignoredAtomic) |
fail |
returned value not gated by vmcnt (loading[src] not set) |
fail |
record allowed on the shared word (<= to <) |
fail |
| lane-guard-after-atomic check removed | fail |
gfx1013 also accepts 32-bit sub |
pass |
Findings
- P3, test gap: the controls refuse
inc,dec,csubandor(tests/compute_buffer_atomics_check.py:56) but not the other 32-bit forms the gfx1013 gate also refuses (sub,smin,umin,smax,and,xor,swap). Widening the accepted set by one opcode leaves the check green, although no draw covers that opcode. One loop over those names in the existing rejection block would pin it. - P3, scope: the title now names add, umax and cmpswap, which matches the gate.
- Not verified by me: the Windows draw results above, and the CI jobs (the author notes a
startup_launchtiming failure unrelated to this PR).
AI-assisted; commands listed were executed locally.
|
Thanks @tedin7. Finding 1 is fixed in |
tedin7
left a comment
There was a problem hiding this comment.
Re-review of head 5daf7adc818198c6f4a3d18395889089cb76fc07. My previous review was at c34d584d. Comment only, not an approval.
Verdict: 0 P1 / 0 P2. The one open finding from my last review is closed.
Linux limits. Linux x86_64, llvm-mc-19 and llvm-objcopy-19 (CI pins 15), Python 3. No Windows, no DXC, no GPU. I did not run --draw (ctest compute_store_aot_gfx1013_buffer_atomics_<adapter>), so the contended-add serialization, the returned old values and the compare-swap hit and miss counts remain the author's GTX 1060 and WARP results. Not reproduced by me.
Previous finding
- P3, "gfx1013 also accepts 32-bit
substays green": fixed.git diff c34d584d HEADis one commit touching onlytests/compute_buffer_atomics_check.py(+4 / -1). The refusal loop now runs oversorted(set(aot.MUBUF_ATOMIC_METHODS) - {"add", "umax", "cmpswap"}), and an assertion keeps the eleven namessub, smin, umin, smax, and, or, xor, swap, inc, dec, csubinside that list, so the loop cannot silently shrink. Nothing undertools/changed since the head I last reviewed, so the lowering review stands.
What I ran at this SHA (worktree at the exact head, git status clean after the mutations)
python3 -B tests/compute_buffer_atomics_check.py: "controls passed".- The same with
--binary llvm-mc-19 llvm-objcopy-19 --llvm /usr/lib/llvm-19/lib/libLLVM-19.so: all five cases (add_offen, umax_idxen, umax_no_glc, shared_add, cmpswap) report "machine words match llvm-mc". python3 -B tests/compute_store_check.py binary llvm-mc-19 llvm-objcopy-19 /usr/lib/llvm-19/lib/libLLVM-19.so: exit 0. The output ends with the two expectedUnsupported MUBUF cache invalidationrefusal lines.tests/docs_links_check.py(17 files, 366 links),tests/bidi_controls_check.py(1299 files),git diff --check origin/main...HEAD: clean.- Mutations in
tools/compute_store_aot.py, each followed by the no-argument check andgit checkout -- .:
| Mutation | controls |
|---|---|
gfx1013 gate also accepts sub (the previously surviving one) |
fail: "Expected rejection: require 32-bit add, umax or cmpswap" |
gfx1013 gate also accepts _x2 forms |
fail, but with "Atomic reduction data is not a known word" (a different assertion, not a rejection pin for the 64-bit gate) |
| cmpswap compare/replacement order swapped | fail |
umax mapped to Min in MUBUF_ATOMIC_METHODS |
fail |
Remaining notes (non-blocking)
- P3: the
_x2mutation is killed only by a downstream "data is not a known word" assertion. A control that feeds an_x2form and expects the "32-bit" rejection message would pin the wide half of the gate directly. Optional. - The CI
startup_launchtiming failure the author describes is not touched by this PR; I did not run Actions.
AI-assisted; commands listed were executed locally.
|
Thanks @tedin7. The
The lowering and the draws are unchanged. Status: ready to merge from our side. Every finding from tedin7's four reviews, the P3s included, is addressed in the code or answered here. CI is green at |
|
Merged main at
After the merge, the atomics controls, Status: ready to merge from our side. CI is green at |
|
Merged main at
Reruns after the merge:
Status: ready to merge from our side. CI is green at |
|
Merged main at Status: ready to merge from our side. CI is green at |
tedin7
left a comment
There was a problem hiding this comment.
Review of head fa86d4c59eb585d6a14b36a8a7ff9689a24db870 (Linux only; no Windows run by me, CI shows Windows build/test and fixture jobs passing on this head).
Checked: title is neutral, PR is not a draft, CI jobs "Build and test on Windows", "Assemble and translate gfx1013 fixtures" and "Run platform-independent Python checks on Linux" pass (the O2 and chart jobs were skipped).
Commands executed locally (worktree of the PR head):
python3 -B tests/compute_buffer_atomics_check.py->gfx1013 atomic translation and serialization controls passedpython3 tests/docs_links_check.py-> self-test passed, 18 Markdown files, 399 linkspython3 tests/bidi_controls_check.py-> no bidirectional controls in 1440 filesgit diff --check origin/main...HEAD-> clean- Mutation 1: in
tools/compute_store_aot.pyswapped the cmpswap HLSL operand order (compare/replacement). The new check fails. Killed. - Mutation 2: in the plain DWORD store guard, changed
cpu == "gfx1030" or not line.startswith(...)so gfx1030 no longer refuses a store after an atomic. The new check still passes. Survived (see P2). - All mutations reverted with
git checkout -- ..
Semantics read against the RDNA 2 MUBUF atomic description: replacement in VDATA, compare in VDATA+1, old value returned in the first VDATA dword with glc, and HLSL InterlockedCompareExchange taking compare first. The lowering matches. The gfx1013 refusals (guarded programs, _x2, other ops, mixed idxen+offen, overlap with the fixed shared word) look sound, and the shared-add serialization oracle with a scramble control is a good test.
Findings:
- P1: none.
- P2
tools/compute_store_aot.py(store branch,if atomic_update and (cpu == "gfx1030" or not line.startswith("buffer_store_dword "))): the gfx1030 half of this condition is not guarded by the new suite. A change that lets gfx1030 write a UAV after its atomic passescompute_buffer_atomics_check.py. Please add one negative control for gfx1030 atomic followed bybuffer_store_dword(or point to an existing test that covers it). - nit
tools/compute_store_aot.pyatomic branch: for non-glc gfx1013 atomics the data register is silently dropped fromvector. That is documented indocs/experiments.md, and theumax_no_glcfixture exercises it. A one-line control that a later read of that register is refused would pin it down.
AI-assisted; commands listed were executed locally.
|
Merged current Status: ready to merge from our side. |
tedin7
left a comment
There was a problem hiding this comment.
Re-review of head 4bf7f7ac66a0a1c0bb7eeb9b4bd16361a8597d19. This head is a merge of upstream main (681d01f) into the branch. I read the PR's own diff against main (9 files, +399/-22).
Verdict: no P1, no P2.
Commands run locally (Linux worktree at this head):
git diff --check origin/main...HEAD: clean.python3 tests/docs_links_check.py: self-test passed, 18 Markdown files, 407 links.python3 tests/bidi_controls_check.py: 1484 files, no bidirectional controls.python3 tests/compute_buffer_atomics_check.py: "gfx1013 atomic translation and serialization controls passed".gh pr checks 1684: Linux Python checks, gfx1013 fixture assembly and Windows build/test all pass. The /O2 job and chart publishing are skipped.
Mutations (each reverted with git checkout -- .):
tools/compute_store_aot.py: changed the guardoffset <= shared_atomic_offsettooffset < shared_atomic_offset. The suite fails withExpected rejection: Return record can overlap the fixed atomic address. Killed.- Swapped the cmpswap operand order in the emitted HLSL,
{operands[1]}, {word}to{word}, {operands[1]}. The suite fails on the emitted HLSL. Killed.
Findings:
- P1: none.
- P2: none.
- nit: the fixed-address atomic guard (
Return record can overlap the fixed atomic address) relies on dword alignment, so a store atoffset > shared_atomic_offsetis at least 4 bytes past it. That holds, because the atomic and dword offsets are both multiples of 4. A one-line comment saying so would make it easier to maintain. - Checked and fine: gfx1013 is limited to unguarded raw-buffer programs.
s_and_saveexec_b32after an atomic is refused. Only 32-bit add, umax and cmpswap are accepted. The cmpswap order matches the ISA (replacement in VDATA, compare in VDATA+1). Without GLC the source register is invalidated rather than given a made-up old value. The per-thread address helperlinear_uav_addressrequires every group axis to be separated. - Not run:
python3 $P win2025. The merge only brought in unrelated upstream changes, and the Windows CI job covering the D3D12 readback check is green on this head.
AI-assisted; commands listed were executed locally.
|
@Jess-Doit could you rebase this branch onto current GitHub reports head Files that conflict with current
Commands run locally: Once it is rebased and CI is green it will be re-checked right away. AI-assisted; commands listed were executed locally. |
4bf7f7a to
809b422
Compare
|
@tedin7 thanks. Rebased onto current The conflict was in
Tests on Windows 10 build 19045,
A note on scope: #2331 and #2382 lowered buffer atomics in Ready to merge from our side. |
809b422 to
3cff259
Compare
|
Rebased onto current The conflict was in
Tests, run on Windows 10 19045 with GTX 1060 + WARP:
Ready to merge from our side. |
Lowers 32-bit MUBUF buffer_atomic_add, umax and cmpswap in the gfx1013 compute translator to InterlockedAdd, InterlockedMax and InterlockedCompareExchange on the raw UAV, one atomic per program, and refuses every other 32-bit MUBUF atomic. The LLVM 15 words are recorded for the fixtures, and the width gate is pinned with defined 64-bit data. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3cff259 to
373f7a7
Compare
|
Fixed the failed Cause: #2511's Fix: the gfx1013 allowlist refusal now starts with Checks:
Ready for more review. |
tedin7
left a comment
There was a problem hiding this comment.
Review of head 27e8b22 (main merged into the PR) against current main. No blocking issues found.
What I checked:
tools/compute_store_aot.py: the gfx1013 raw UAV path now accepts 32-bitbuffer_atomic_add,umaxandcmpswapwithoff,offenandidxenaddressing. 64-bit forms and other opcodes are refused with a clear error. Thecmpswapdata range uses VDATA and VDATA+1.- Overlap: #2331 (merged) lowers buffer atomics in
tools/startup/gfx2hlsl.py. This PR works in a different tool (compute_store_aot.py), and #2511's float min/max atomic block is kept intact (the op allowlist still reaches its expected error text). - Tests:
tests/compute_buffer_atomics_check.pypins machine words against the assembler, the emitted HLSL argument order, and the translation refusals. The--drawmode is a real D3D12 readback of the raw UAV, registered ascompute_store_aot_gfx1013_buffer_atomics_<adapter>in CTest. The workflow andAGENTS.mdcheck lists are extended in both places. - Care item
.github/workflows/windows.yml: the only change is one extra Python check entry (LLVM 15 binaries) next to its siblings. The PR's own CI run on this head exercises it. - This PR does not claim to advance game startup.
Commands run (Linux, clean worktree at this head). This machine has LLVM 19 only, so I ran the check with llvm-mc-19/llvm-objcopy-19 instead of LLVM 15:
python3 -B tests/compute_buffer_atomics_check.py --binary llvm-mc-19 llvm-objcopy-19 --llvm libLLVM.so.1: all cases OKpython3 tests/docs_links_check.py: OKpython3 tests/bidi_controls_check.py: OKgit diff --check origin/main...HEAD: clean- Mutation 1: drop
umaxfrom the gfx1013 allowlist: the check fails. - Mutation 2: map
cmpswaptoInterlockedExchange: the check fails.
Not covered here: the D3D12 draw readback and the LLVM 15 run (Win2025 and CI follow separately).
AI-assisted; commands listed were executed locally.
|
Win2025 WARP receipt for head 27e8b22 after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
AI-assisted; commands listed were executed locally. |
Post-merge audit of
|
| mutation | caught |
|---|---|
buffer_atomic_smin loses signed (Min, True → Min, False) |
caught |
buffer_atomic_sub stops negating (is_sub True → False) |
caught |
cmpswap with glc: compare/replace swapped (words[1], words[0] → words[0], words[1]) |
caught |
cmpswap without glc: same swap in InterlockedCompareStore |
caught |
cmpswap data VGPR count 2 → 1 |
caught |
InterlockedExchange loses its output operand |
caught |
the compute-stage restriction removed (if self.kind != 'cs': raise) |
caught |
The two cmpswap swaps matter most: RDNA 2 puts the replacement in vdata[0] and the compare in vdata[1],
while HLSL takes compare first. Getting that backwards compiles and runs, and silently stores the wrong value — the
fixture catches both the glc and the non-glc form, which are different HLSL intrinsics.
The InterlockedExchange one is a nice second-order guard: the comment says HLSL's form always requires an output
operand, so dropping ao is a compile error rather than a logic error — but the fixture still catches it, meaning it
compares the emitted call text rather than only whether translation succeeded.
A correction about my own run, since it changes what the numbers mean
My first pass used tests/compute_buffer_atomics_check.py and reported five survivors. That is a different,
pre-existing fixture, registered with --draw <dxc> against the desktop device — it exited 0 on the no-argument run
for its own reasons and never touched the paths I mutated. The file this PR adds is
tests/startup_compute_buffer_atomics_check.py. Re-run against it, all seven are caught as shown above.
Two near-identical filenames in one directory is the trap; I should have matched the name from the PR's own file list
rather than from a Select-String for buffer_atomic. Recording it here because a "survived" list from the wrong
fixture reads exactly like a coverage gap.
AI-assisted; pure Python, Windows 11 build 26300, no DXC or GPU for the rows above.
Refs #1545
Change
Extend the existing raw UAV atomic emitter to gfx1013 DWORD add, unsigned
max and compare-swap. The checked address forms are a fixed shared word
(
off), a dispatch byte offset (offen) and a dispatch index with adeclared stride (
idxen). Returning atomics publish the old DWORD tothe first data VGPR after
vmcnt(0). A later plain DWORD store can recordit in a disjoint field. Compare-swap reads the replacement from VDATA
and compare from VDATA+1. The latter still holds the comparison word
after the wait. AMD RDNA 2 Shader ISA
The pure-Python controls also pin the emitted
InterlockedCompareExchangeargument order, theglcold-value return and the record that stores it, and the non-returning form. Translation controls refuse a lane guard before or after the atomic, 64-bit forms, unmodeled opcodes, an atomic
to an SRV, a return consumed before its wait, overlapping record fields,
an address shift that wraps within a group, and consumption of the first
data VGPR after a non-returning atomic without an explicit rewrite.
Scope requested on #1545
s_waitcnt vmcnt(0), or after only anlgkmcntwait, is refused.Verification
The full draws below ran at
85271d0e. Later commits change only the test file and CMake, not the lowering, the fixture programs or the draw references:They also merge main. At
a823f6d4,compute_store_aot_gfx1013_buffer_atomics_{warp,hardware}passed again on both adapters.The two commits after it,
5daf7adcand43cd101a, only add controls totests/compute_buffer_atomics_check.py. Every other 32-bit MUBUF atomic is refused, and so are the 64-bitadd,umaxandcmpswapforms with defined data. Removing the width check from the gfx1013 gate now fails the no-argument check.Tested
85271d0e85a782066f1ce50ae93cf021f6a11c1con basedf488f52338101bbcf049649bd737bb2d4dcb71b. Windows 10 22H2 build 19045.6456and Windows SDK 10.0.26100.0 DXC, targeting
cs_6_0for the new cases.The branch merges cleanly with #1649 at
faa78cd4. It is merged with main atabb24b67(0c1c7e2d).The shared add reconstructed a valid serialization of the lane operands
from
9e3779b1to9e377bc1. The compare-swap case checked 16 hits and16 misses, both data VGPR records, and all untouched words. The add-as-OR
mutation first differed at word 0 (
9e3779b2expected,9e3779b1read).Writing the addend into the old-value record first differed at word 1
(
9e3779b1expected,00000001read). The debug layer reported zerowarnings and errors in the new Debug runs. The full Debug selection
recorded 85 passes, 6 capability skips and 0 failures. The existing raw
64-bit reduction, exchange and counter cases skipped on both adapters
because they require SM 6.6 and Int64ShaderOps. Release (
/O2) gave the same result: 85 passes,6 capability skips, 0 failures.
After the merge with main, a Debug rerun of
compute_store_aot_(warp|hardware), the newcompute_store_aot_gfx1013_buffer_atomics_{warp,hardware}and the existingmubuf_{reduction,exchange,counter}cases on both adapters had 10 passes and the same 6 capability skips.
The recorded words are LLVM 15's, as in CI. LLVM 15 and 19 leave the unused src2 field of the two
v_mul_lo_u32words in the cmpswap case at 0, where LLVM 23 writes inline 0, so a local LLVM 23 rundiffers in those two bytes only. The Ubuntu job also
checks the container CLI with LLVM 15.
AI-assisted (Codex, driven with Claude Code; Claude Code reviewed the change and ran the Release and post-merge checks).