Repository navigation
feat(shader): model ds_ordered_count swap - #7429
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
On the overlap with #6258: both change A trial merge of the two touches no source conflict; only the tests conflict:
Whichever merges second can rebase those two files. Neither depends on the other. AI-assisted: yes |
|
Tested at
One case the test doesn't reach: a wave64 whose first active lane is in the upper half. My local probe ran 64 threads with
With #6258's For the semantics: LLVM AI-assisted: yes (Claude Code); results above were run on this machine. |
|
Rebase handoff, with one test-adaptation caveat — rebased onto current The caveat: Everything else is green apart from the four known To pick it up: Head is |
A ds_ordered_count with offset1 bit 4 set swaps the first active lane's value into the GDS counter instead of adding it. Emit it as one device-scope atomic exchange through the same path as the ordered add, and return the counter's previous value to every active lane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
edd5059 to
b0558ce
Compare
|
First AMD-on-Linux (RADV) run of this PR. Merged onto AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite ( The tests around the change all run and pass: GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
|
First AMD-on-Linux (RADV) run of this PR. Merged onto AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite ( Comparing the JUnit output with This checks correctness only; I did not measure performance. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes |
|
Follow-up on my rebase caveat, now resolved by your head |
|
Rebased onto current What I changed on top of your commit:
Checked: the swap shares |
What
ds_ordered_countwithoffset1bit 4 set (swap instead of add, as LLVM encodesllvm.amdgcn.ds.ordered.swap) throwsordered swap is not modeled. God of War Ragnarök (PPSA08330) dispatches a compute shader (0x10527b8200) that uses it, and stops there:The swap now goes through the same path as the ordered add (
AppendConsumewithordered): a new IR opcodeDataOrderedSwapwith the operands ofDataOrderedCount, emitted as one device-scopeOpAtomicExchangeof the first active lane's value on the GDS counter, with the counter's previous value returned to every active lane. As for the ordered add, the waves are not serialized in launch order, so which wave's value the counter keeps, and which previous value each wave gets, need not match the hardware; the technical debt entry fords_ordered_countsays so. Counts of more than one dword and LDS forms still throw.Tested
agc_driver_gds_append_consumegains a swap case: in each workgroup shape (wave32/wave64, 32/64 threads) each wave swaps its first lane's value (lane + 3) into counter 0; every lane of a wave must return the same value, and the returned values plus the final counter must be exactly the start value plus each wave's value.agc_wave_control_decodenow expects the swap to recompile instead of being refused.ctest1468 tests, all pass or skip for device features exceptpr_overlap_toolsandcheck_main_sync(local git 2.30 lacksmerge-tree --write-tree) andguest_sce_net(DNS timeout), none related;tools/check_conventions.py --base origin/mainandtools/check_test_registration.pypass. After rebasing ontomain66e71b6 theagc_tests pass again exceptagc_driver_address_passes, which is intermittent on thatmainwithout this change too (8 of 10 runs fail witha draw reading through the table after another did not continue its pass; 5 of 10 with it) and does not use GDS.82f0c9aec+ perf(agc): draw finisher pipeline (APS5_DRAW_PIPELINE) #6946, fix(agc): skip a periodic pipeline cache save while a pipeline creation holds the cache #6958, fix(recompiler): give a dynamic-mip storage image a slot for every level #7238, feat(shader): resolve nested image tables through runtime pointers #7223, fix(recompiler): read lane spills back through relative-addressing window registers #6277, fix(shader): plan image tables through invariant descriptor phis #6417, feat(agc): link calls through the AGC FS table #6160, fix(ampr): return EBUSY when a command does not fit and EPERM before a buffer is bound #7300; feat(agc): link calls through the AGC FS table #6160 is needed first, without it the same shader stops earlier on its computeds_swappc_b64target): without this change it stops at 438 s on the line above (1 of 1 run); with it, alive for the whole 720 s run with no shader refusal (1 of 1). The window is still black at ~0.1 FPS, so the title is far from playable; this only removes the stop.Checklist
main; no other open PR implements the same functions (fix(shader): add the ordered count of a first active lane in the upper wave64 half #6258 changes the ordered add's lane, not the swap).mdfiles or images added to the repository🤖 Generated with Claude Code