shaders: coalesce and inline wave64 x_round exchanges (SHADER-W64-XROUND-BARRIERS) #2119
Closed
leonida/mandy
robot00f wants to merge 0 commits from
perf/w64-xround-barriers into main
pull from: perf/w64-xround-barriers
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2119
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/w64-xround-barriers"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
Claimed in the coordination issue as:
SHADER-W64-XROUND-BARRIERS(https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172190888; follow-up to https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7159151871 and https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7159367489)What and why
Coalesces wave-wide Workgroup exchanges and eliminates helper-call / modulo overhead in
Gen.x_round(emulate_inlineintools/rdna2spirv.py) under--wave64-emulateon 32-wide GPUs, while keeping%x_bufbyte-identical ((2*L + 6*W + 7)dwords):Gen._x_round_inline:%x_pre_*_fnOpFunctionCalls (CGSCC inliner cloning across hundreds of callsites increased NVVM compile time by+12%to+21%vs inline).%x_itthrough0..5(lcm(2, 3) = 6, preserving bothit & 1parity andit % 3ring-slot indexing) with zeroOpUMods and omits the two dead scheduler-word resetOpAtomicStores on multi-wave workgroups whenevermini_blocksandtail_blocksare empty.0x948(ImageMemory | WorkgroupMemory | UniformMemory | AcquireRelease) to0x108(WorkgroupMemory | AcquireRelease) whenever"mem"is clean inx_dirty(and inx_order_barrierwhen only"lds"is dirty).Any-vote and first-lane caching (x_vcache,x_flcache,x_vkeys):Anyvotes and first-active-lane indices acrossscc_from_mask,branch_condition,wave_mask,v_readfirstlane_b32, and DPPfi:0within a basic block, and preservesx_genacross internalOpSelectionMergeregions (buffer_load,buffer_store,ds_*,_emit_rfl_run) that do not write%active,%vcc,%vcc_hi, or%sgpr.Anyfrom a cached(lo, hi)mask in 2 ALU ops ((lo | hi) != 0,0barriers,0atomics); whenbranch_conditionreuses a cachedAnyvote whilex_dirtyis non-empty, emits a barex_order_barrier()to preservewave64_emulate_opt.py'ssb_clears_dirtyinvariant.x_vkeysregistration inmask_dstto full-wave masks (n == 2SGPR pairs and fullvccin wave64) so 32-bit half-mask writes never alias 64-bitx_vcacheentries._pending_scc_voteinemulate_inline):scc_from_mask/scc_any_halfvotes until%sccis read/overwritten or a label/merge/barrier/branch/%pcstore occurs.branch_conditionon the same mask (1OpAtomicOr,1barrier), with another 1-bitg_voteon a distinct mask (2 -> 1barrier via 2-wordbits=(p_bit, bit2)), with adata-onlyx_round(v_readlane_b32,ds_bpermute_b32,ds_swizzle_b32,quad_any, DPPfi:1,2 -> 1barrier viadata + bits), or withx_order_barrier(2 -> 1barrier), and drops the vote (0barriers) if%sccis overwritten before being read.v_readfirstlane_b32runs (Gen._emit_rfl_run):firstonce (0barriers if already inx_flcache/x_mcache, else1round on item 0) and transfers up to 64 remaining values per wave from the single running lanewave_lane == firstacross oneOpControlBarrier(4 -> 2or1round barriers for V# scalarization,8 -> 2or1for T# scalarization, piggybacking any pending SCC vote into the same barrier).NVVM ablation note (
#1608): Reproducing the 192-VGPR unfolded binaryif/elseScreenProbesshape on GTX 1050 Ti (sp_tree_156:464.1 KiB,156barriers ->4.168 s;sp_tree_324:898.7 KiB,324barriers ->12.224 s) and stripping all middleOpControlBarrierinstructions (NO_BARS) leavesvkCreateComputePipelinestime unchanged (12.13 s -> 12.22 s, and4.91 s -> 4.88 son 320-barrier loops). Thus the ~11 s baseline on pure unfoldedsaveexectrees is dominated by%pc-guardedOpSelectionMergeblock splitting (SROA/Mem2RegPhi webs across 192 VGPRs) +%x_pre_*_fncloning rather thanOpControlBarrieritself; where cross-lane votes, mask reads, andv_readfirstlane_b32runs coalesce (probe_80/probe_160), cutting exchange blocks in half cuts NVVM compile time by-68.5%to-69.6%(3.2x–3.3xfaster).Tested
Cold
vkCreateComputePipelinesbenchmarks (vk_pipeline_check --jobs 1,__GL_SHADER_DISK_CACHE=0, uniqueOpStringnonce per trial, 3 trials each, exactorigin/mainvs this PR):origin/mainbarriers /OpFunctionCall/OpUModOpFunctionCall/OpUModorigin/mainmedian (3runs)3runs)probe_80(80 live-SCCsaveexec+execz+ 4xreadfirstlane+readlaneblocks)641/640/5(555.0 KiB)321/0/0(554.8 KiB)6.062 s([6.369, 6.062, 6.030])1.907 s([1.679, 2.144, 1.907])-68.5%(3.18x)probe_160(160 probe/waterfall blocks)1,281/1,280/5(1,100.9 KiB)641/0/0(1,101.9 KiB)17.433 s([17.338, 17.710, 17.433])5.296 s([5.310, 5.296, 5.121])-69.6%(3.29x)sp_tree_156(192-VGPR unfolded binaryif/elsetree, dead-SCC votes only)156/339/4(464.1 KiB)156/184/0(529.8 KiB)4.168 s([4.168, 3.750, 4.587])3.649 s([3.789, 3.635, 3.649])-12.5%sp_tree_324(192-VGPR unfolded binaryif/elsetree, dead-SCC votes only)324/699/4(898.7 KiB)324/376/0(1,036.5 KiB)12.224 s([14.261, 12.181, 12.224])11.479 s([11.853, 11.479, 11.279])-6.1%GPU execution (
LEONIDA_W64_EMULATE=1,subgroup 32..32):vk_compute_test cs_w64x_xround_coalesce.spv 1 dump: 3/3 runs0 mismatches,out[0..7] = 147 308 1832 444 625 1335 2379 332.cs_dpp_w64, all 20cs_w64x_*,cs_w64x_partial,cs_w64x_partial_scmp,cs_wave64_ballot, andcs_wavemask) translate, passspirv-val, and match expected outputs before (23/23) and after (24/24).CPU semantic, translator, and repository checks:
python -I tests/semantic/test_wave64_xround_barriers.py(9/9, 40/64/128-thread forward & reverse workgroup interpreter +spirv-val)python -I tests/semantic/test_wave64_emulate_opt.py(33/33),test_wave64_emulate_barriers.py(13/13),test_loop_ballot_barrier.py(15/15),test_cs_shared_memory_limit.py(15/15),test_w64x_scalar_load_order.py(5/5)python -I tests/test_shader_checks.py(88/88),test_ci_registration.py(16/16),test_text_write_line_endings.py(3/3),test_docs_*.py,scripts/check_no_game_data.py(exit 0).GPUs tested: NVIDIA GeForce GTX 1050 Ti (Pascal, 4 GB), driver 582.28, Vulkan 1.4.312, Windows 10 Pro 10.0.19045
AI-assisted: yes (Antigravity, Gemini 4 Carbon)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.Whole-corpus check of 72d722a on a retail boot, Windows 11, RTX 4080 16 GB (NVIDIA 621.24), 32 GB RAM. Tools were this head merged with #2102's head 8481605 (only docs/design.md conflicted; the three semantic test files test_wave64_xround_barriers, test_wave64_emulate_opt and test_loop_ballot_barrier pass on the merge: 9, 34, 15).
--wave64-emulate, 16 shards each: same program counts as with #2102 alone, every shard's stderr empty. The compute library was not retranslated, and I did not run spirv-val over the output.So on this card: no translation regression seen across the corpus, and no visible change to the world-start device loss, which this PR does not claim to address. Not measured: frame time or barrier counts before and after.
AI-assisted (Claude Code).
Verdict: not ready to merge yet (1 blocker, 1 request). The PR is still a draft, so this is early feedback.
test_cached_branch_condition_survives_buffer_store_and_orders_dirty_memoryfails attests/semantic/test_wave64_xround_barriers.py:244(OpAtomicOr3 != 2). It passes on the PR head alone.translate()/barriers_under_control_flow,tools/rdna2spirv.py:18124and:18881-18893on main, merged with #2098 after this PR's base). In my sample 157 emulated programs now take that fallback and 66 keep the inline form. I did not check whetherprobe_80/probe_160take it. Could you re-run the table on current main?Setup: PR head
72d722a11(unchanged when rechecked just before writing this). The PR's merge base is1bf5eeafd. Main isa73a57e13, 137 commits later, and 3 of the touched files changed in that range (tools/rdna2spirv.py,docs/design.md,tests/semantic/test_wave64_emulate_opt.py). Local merge of main into the PR:9a64951cc, no conflicts (auto-merged in those 3 files). Windows 11 (10.0.26300), Python 3.14.0.llvm-mc --versionreports "Ubuntu LLVM version 21.1.8" (runs through WSL). All tests ran on the CPU SPIR-V interpreter. No GPU was involved, and nothing ran in the game.Tests
test_wave64_emulate_opt33/33,test_wave64_emulate_barriers13/13,test_loop_ballot_barrier15/15,test_w64x_scalar_load_order5/5,test_cs_shared_memory_limit15/15.test_wave64_xround_barriersdoes not exist on main.test_wave64_xround_barriers9/9.test_wave64_xround_barriers8/9. The other five files give the same results as on main.OpControlBarrierunder control flow.%pcguard. So main's check sends the whole program toemulated wave64 rounds:emulate_planisNone, 2 barriers, 3OpAtomicOr.OpAtomicOr.control_flow == "emulated wave64 rounds",barriers_under_control_flow(spv)false).test_lds_src2. On this machinetest_lds_src2also fails on main, becausellvm-mcruns through WSL and cannot see the Windows temp folder (open PR #1733 addresses it). It does not count against this PR.scripts/check_no_game_data.pyon the 7 changed files: exit 0.Mutation (the PR's tests against main's
tools/)test_wave64_xround_barriers: 8 of 9 tests fail, 11 failures counting subtests::153(OpFunctionCallcount):189(OpUModcount):215(barrier count):244(OpAtomicOrcount):302(barrier count, all 4 subtests):331(count of0x108barriers):361(barrier count):425(barrier count)test_half_mask_write_does_not_alias_full_wave_vote_cachepasses on main.test_wave64_emulate_opt: 1 failure, at:1544(assertNotIn("%x_pre_", spv)).Corpus (1-in-9 sample,
--wave64-emulate, translator only)s_sethalt).spirv-val: all 1,629 valid with main, and all 1,629 valid with the merge.OpAtomicOr34,423 -> 26,921, totalOpUMod51,880 -> 44,378.OpFunctionCallwent down in 57;OpUModwent up in 11 programs (largest 7 -> 36);OpAtomicOrwent up in 27 programs (largest 1 -> 53). These are inline copies of what the removed helper functions held once. The PR body's ownsp_treerows show the same growth (+14% and +15%).Safety
Line numbers are for
tools/rdna2spirv.pyat the PR head.0x108is used only when no("mem", *)access is dirty. Buffer, global, flat, image load/store/atomic and scalar loads all count as"mem"(x_memory_order). An emptyx_dirtyinx_order_barrierkeeps0x948. I found no case where needed memory ordering is lost.%x_itcycle is used only when_x_has_schedulers()is false (:5690). Modules with mini or tail schedulers keepOpUMod(:5666,:5712), soit % 3andit & 1stay in step with the scheduler loops.emit,:474):%pcstore or read of%scc;OpStore %sccin the same straight run, which is correct because the old value is dead.v_readfirstlane(_emit_rfl_run,:5826):it & 1parity;x_gen. The savedx_genis restored after an internal selection only when that selection wrote no%active,%vcc,%vcc_hior SGPR.Suggestions
:244for main's fallback, as described under Tests.OpUModand atomics into every round instead of removing them.scc_from_maskcache now also runs in rounds mode (if self.emulate:). No PR test covers that path in rounds mode. In my sampleOpAtomicOrwent down in 1,109 of the 1,237 rounds-mode programs.Not covered by this review
tests/test_translate.py, no hand-written GPU tests (includingcs_w64x_xround_coalesce).OpUModand atomics in a structured program does not say whether it runs slower at run time or compiles slower.AI-assisted: yes (Claude Code, Claude Opus 5.5, ran the tests and wrote this; a second agent checked this text)
RTX 3090 / 621.40: test_wave64_xround_barriers.py is 9/9 on this head (72d722a11) and 8/9 merged onto current main a73a57e13 (test_cached_branch_condition_survives_buffer_store_and_orders_dirty_memory, line 244, OpAtomicOr 3 != 2). probe_80/probe_160 take main's round fallback (2 barriers on both sides). Cold vk_pipeline_check --jobs 1, 3-trial median compile: probe_80 1.070s [1.07, 0.96, 1.09] -> 0.770s [0.77, 0.71, 0.77]; probe_160 3.050s [3.05, 3.13, 2.68] -> 2.020s [2.01, 2.13, 2.02].
Tested
72d722a11merged ontomaina73a57e13(it merges cleanly), on an Apple M3 (macOS 26.5.1). I ran the fullscripts/run_gpu_tests.pyin auto mode, with test programs built frommain. I tested the merge rather than the branch alone because a branch from before9f98dcc61failsps_texagainstmain'svk_bindless_test(the tagged descriptor table), which says nothing about this change.mainmain+ this PRLEONIDA_W64_EMULATE=1The new
cs_w64x_xround_coalescepasses underLEONIDA_W64_EMULATE=1on MoltenVK (147 308 1832 444 625 1335 2379 332) and skips natively (no 64-wide subgroup), as expected on a Mac. No new failure. The ones left are the same on both sides:cs_fma_fused(#1724),ps_ssharp(#1774) andcs_imgatomic_ext(#1518) on MoltenVK; KosmicKrisp's(NAN)-constant fixtures (#2229) andcs_imgatomic_extthere.AI-assisted (Claude Code). No game data.
Checked 353d0387 merged into main 2859d0c9, by Claude Code (AI-assisted) on my behalf. Linux, Mesa lavapipe.
One test fails after the merge:
tests/semantic/test_bitcast_round_trip.py::test_helpers_return_the_source,AttributeError: 'Gen' object has no attribute '_pending_scc_vote'. The test builds aGenwithGen.__new__(no
__init__), andemit()now readsself._pending_scc_vote. Declaring the two new fields as class defaultsmakes it pass (checked locally), e.g. right under
class Gen::The rest of
tests/semanticpasses (501 files, 6,383 tests). Fuzzers on the merge, all equal to main on the sameseeds:
crosslane_fuzz.py --wave 64 --modes emulate --dpp --ext --seed 205 --programs 150: 143 match, 5 mismatch,2 hyp_only, the same programs as on main (all masks read as data, #1397/#1043);
lds_fuzz.py --wave 64 --emulate150/150;valu_fuzz.py --family mem --wave 64 --emulate120/120;valu_fuzz.py --family f16 --wave 64 --emulate100/100;cf_diff.py --wave 64300/300.Not run: a hardware GPU, native wave32, the corpus.
Generated by Claude Code
Confirming @kawaii-shakal's finding on a Mac (macOS 26.5.1, Python 3.15.2), with this PR's
tools/rdna2spirv.pyonmainec91d695c:tests/semantic/test_bitcast_round_trip.pyfails ('Gen' object has no attribute '_pending_scc_vote') and passes on plainmain._pending_scc_vote = None,_flushing_scc_vote = Falseunderclass Gen:), it passes. So does the whole translator suite: 503 files, 6396 tests, 0 failed.main(ec91d695c) indocs/design.md. At2859d0c9bit merged cleanly.My earlier comment here covered the GPU suite only, which is unchanged. This adds the translator suite.
MEASURED, 1 run each. AI-assisted (Claude Code, Claude Opus 5.5).
Re-checked head 353d038 merged with current main (c0201a80), Linux, CPU only:
test_bitcast_round_trip.py::test_helpers_return_the_sourcestill fails (AttributeError: 'Gen' object has no attribute '_pending_scc_vote'): the head sets the two fields only in__init__(tools/rdna2spirv.py:551-552),and the test builds
Genwith__new__. The class-level defaults from my earlier comment (and Tauwni's) arestill the fix. It is the only failure of the full translator suite on the merge: 503 files, 6,396 tests, 1 file
failed (main alone: 502 files, 0 failed).
test_cached_branch_condition_survives_buffer_store_and_orders_dirty_memorypasses on the merge, andtest_wave64_xround_barriers.py+test_wave64_emulate_opt.pypass in full (45 passed; the one failure is thebitcast test above).
touch only CI and standalone tests, nothing of the translator), so the
docs/design.mdconflict is gone.AI-assisted (Claude Code); I ran the tests and checked the results.
Generated by Claude Code
Rebased onto current
mainin c4b709a1 and added class-level defaults_pending_scc_vote = Noneand_flushing_scc_vote = FalseonGen(thanks @kawaii-shakal and @Tauwni): bothtests/semantic/test_bitcast_round_trip.pyandtests/semantic/test_wave64_xround_barriers.pynow pass underpython -I.Tested on a 32-wide GPU with emulated wave64: GeForce GTX 1050 Ti 4 GB (Pascal), NVIDIA 582.66, Windows 10 19045 (profile S). Head
c4b709a14merged ontomain34e33d3dd(clean), test programs built frommain, llvm-mc 21.1.8, Vulkan SDK 1.4.363.MEASURED:
tests/semantic/test_wave64_xround_barriers.py(merged tree): 9/9 OK.scripts/run_gpu_tests.pywithLEONIDA_W64_EMULATE=1: main 236/269 passed, 31 skipped -> this PR 237/270, 31 skipped; the newcs_w64x_xround_coalescePASSES.LEONIDA_W64_EMULATE=1 LEONIDA_MESH_COMPUTE=1: main 242/269 -> this PR 243/270, 25 skipped.cs_imgatomic_ext,cs_texture_uav), unrelated to this PR.AI-assisted (Claude Code).
CORRECTION to my comment above: the 8/9 was measured on main a73a57e13 and is out of date. RTX 3090 / 621.40, c4b709a14 on main 431ceba4f: test_wave64_xround_barriers.py 9/9, test_bitcast_round_trip.py 3/3, test_wave64_emulate_opt.py 34/34. GPU suite with validation: only cs_imgatomic_ext and cs_texture_uav fail, same as on main; no validation errors. The probe_80/probe_160 timings were also taken on a73a57e13 and need re-measuring.
Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.
(AI-assisted triage.)
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.