D3D12.X: a folded indirect dispatch of a split program runs all its groups #1418
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1428"
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?
Imported from ivall/xcl. Originally posted by lukastaro on 2026-11-24T15:51:30Z.
Part of #505. A follow-up to the fold of dispatches past 65 535 groups in X, which reached
mainwith the world-main integration branch (fe650b66,82daf31d, with @theaustinayers' bound on the groups in9cc53f15and the indirect pass opt-in behindXCL_CLAMP_INDIRECT=1). This branch's earlier commits are all inmainnow; what is left are two places where a folded dispatch still did not run the groups the console runs.What is in it (one commit on top of
main,7b842cc)c4252f1): a Dispatch-onlyExecuteIndirectof a split compute program, once its indirect chain is ready, never reached the clamp pass. The chain's slicer tookmin(counts, 65 535), so of 72 512 × 1 × 1 the last 6 977 groups did not run, and whether they ran depended on whether the chain was built yet. WithXCL_CLAMP_INDIRECT=1the slicer (recomp/pso.rs) now takes the counts as the clamp pass does: folded into Y with the console's count written to the dispatch'sIO_GROUP_LIMITword, clamped, or none past the bound. It cuts the folded grid into its slabs (or the whole form's command). It runs after the bind, since it needs the io's address, and the binding is set again after it (dispatch_chain::execute_indirect,bind.rs). Without the switch nothing changes.recomp/emit.rs): a program the split wave64 form remaps in Y (for example 32 × 4 threads: two hardware groups a console group) took its fold row from the hardware'sgid.y; the console's row isgid.y / ratio. Before, each console group of a folded dispatch ran with half its threads, and the second row's groups ran as others. A directDispatchreaches this:dispatch_chain::remapped_gridscales the folded grid's Y by the ratio and keeps the remapped program.recomp::FOLD_GROUPS_HLSL, which the clamp pass (clamp.rs) and the slicer both include.split_indirect_slicer_folds_as_the_clamp_passchecks the slicer's commands and io word for folded, whole-form, within-limit, non-count (1.0f) and zero counts, and with the fold off; it fails on the previous slicer.gpu_folded_dispatch_with_a_remap_in_y_runs_each_console_group_oncecounts each console group's threads atomically (128); it gives 64 on the previous emitter.The translated compute HLSL changes for programs remapped in Y, so their cached translations are made again once.
Tested
XCL_DXC_DIR); tests in debug, smoke runs in release.split_indirect_slicer_folds_as_the_clamp_pass,gpu_folded_dispatch_with_a_remap_in_y_runs_each_console_group_once,gpu_compute_folded_dispatch_runs_each_console_group_once,indirect_group_counts_are_folded_or_clamped_on_the_gpu,dispatch_thread_limits_seed_compute_exec_for_native_and_remapped_groups: 5 passed.cargo test -p xcl --lib -- --test-threads=4aborts with 0x80004005 on this machine, onmain86e86fcas on this branch, at the same place (list_xtests, thensparsetests whenlist_xis skipped;list_xalone passes 113 of 113 on both). Split that way:list_x113 passed on both; the rest 1 794 passed and 0 failed on this branch before the abort, 1 795 passed and 0 failed onmain. No failures are new.Regression run
main:
PR:
The 60 s stay in the game's menus and loading screen. The PR's first run after the build had 1 289 frames and a peak commit of 26 982 MB (its shader caches were made new for the changed translator source); the block above is the run right after it, with no change in between.
Not tested
XCL_CLAMP_INDIRECTis off by default onmain, and the smoke runs stay before the world.AI use
main, wrote the fix, the tests and this description; the runs above were made on the hardware named. The slicer change follows the candidate @thehollowedone posted in the review.🤖 Generated with Claude Code
https://claude.ai/code/session_016SP4yAshKooAmiGUcvcSzU
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-24T16:00:31Z.
Ran the two new tests at
e29892e(re-run after the head moved again; earlier runs werea902d3eandcf6cc59): Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.XCL_ADAPTER=nvidia cargo test -p xcl --lib gpu_compute_folded_dispatch 1 passed; 0 failed; 0 ignored (exit 0) XCL_ADAPTER=nvidia cargo test -p xcl --lib indirect_group_counts_are_folded 1 passed; 0 failed; 0 ignored (exit 0)Both still pass on the new head:gpu_compute_folded_dispatch_runs_each_console_group_onceruns a real folded dispatch on the GPU here and each console group runs exactly once, andindirect_group_counts_are_folded_or_clamped_on_the_gpupasses too. Not tested: a title that actually issues more than 65 535 groups in X (no unpacked title here), RDNA2/RDNA4 and Intel GPUs, Wine, release profile, native wave64. AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - built the PR's head commit from a clean tree and ran the tests on this machine; no local changes were made.Update (25/11, after the head moved to
7dbd80c): re-ran the same two tests at the new head, which also unfolds a folded dispatch in the direct translators.Environment unchanged: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
Both still pass on
7dbd80c. The PR is currently in conflict againstmain1a0bbe3; this run is on the exact head commit in a detached worktree, not on a rebased tree.Not tested (same gaps as above): a title that actually issues more than 65 535 groups in X, RDNA2/RDNA4 and Intel GPUs, Wine, release profile, native wave64.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the new head in a detached worktree, rebuilt, ran the tests, and updated this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-24T16:02:30Z.
Update for head
7dbd80c: same result. Applied onmain1a0bbe3,gpu_compute_folded_dispatch_runs_each_console_group_oncepasses on the RX 9070 XT (native wave64) and the RTX 3060. Wholegpu::filter: RX 9070 XT 630 passed, 2 failed (the #2115 fuzz seeds, same onmain); RTX 3060 632 passed, 0 failed.AMD run, which this PR lists as not tested. Updated for head
280164a(earlier runs ona902d3e,cf6cc59ande29892e, same result).Tested: pass, head
280164aapplied onmain689f2db, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --lib -- gpu::recomp --test-threads=4:gpu_compute_folded_dispatch_runs_each_console_group_onceok. The 6 SKIPPED lines (per-lane form refused for some f16/f32 programs) are the same onmain.main.On
a902d3e,cargo test -p xcl --lib -- d3d12x --test-threads=4also passed on both (145 passed, 0 failed, 1 ignored); not rerun since.Not tested: RDNA2; the upper-boundary case from the review above beyond the PR's own tests; the whole workspace suite; a title.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T16:05:04Z.
Indirect dispatch fold disagrees with the CPU at the upper boundary
On
a902d3e3e02e497d8d30b37cdccd89ba9585feb1, the existing fold tests pass on my RTX 5090, including the 72,512-group case. I extendedindirect_group_counts_are_folded_or_clamped_on_the_gputo compare the GPU setup pass’s readback withbind::foldfor three additional X counts, with Y and Z both set to 1. The test reads the generated counts without submitting them as a dispatch.(X, Y, Z)(X, Y, Z)(65535, 65535, 1)(65535, 65535, 1)(65535, 1, 1)(65535, 65536, 1)u32::MAX)(65535, 1, 1)(65535, 0, 1)The shader in
clamp.rscan produce a row count above the D3D12 limit, and the addition in its ceiling division wraps foru32::MAX. In a temporary local test I computed the ceiling using division and remainder, and kept the existing clamp path when the row count exceeded 65,535. The extended test then passed, including agreement on the stored fold limit.Tested
cargo test --locked -p xcl --lib indirect_group_counts_are_folded_or_clamped_on_the_gpu -- --nocapture --test-threads=1on the temporary fixture. The PR shader failed the two out-of-range comparisons. The local correction passed all six cases.Not tested
AI use
Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T16:22:26Z.
Review: COMMENTED
At g.x == UINT_MAX, g.x + 65534u wraps to 65533, so the quotient becomes 0 and the folded indirect dispatch runs no groups in Y. Please use overflow-safe ceiling division and add a UINT_MAX case to the GPU clamp test. AI-assisted review; I checked the arithmetic against the limit documented in this PR.
Imported from ivall/xcl. Originally posted by oz-stanislav-zhukov on 2026-11-24T16:12:34Z.
Test report from the retail game, GTA VI 1.0.2.1. With this PR applied, the world-loading GPU hang did not show up in one run; before it, the hang happened in both runs I had on the same machine. Correction (edited): the PR's per-dispatch report lines never appeared in that run, so I can't attribute the missing hang to it. See below.
Tested at
a902d3e, cherry-picked ontomainb7aa9f3together with other open PRs (local branch, commit5ab018c): #751, #688, #1123, #488, #789 (ported by hand onto the currentsparse.rs), #1195, #1323, and two localxgCopyFromSubresource fixes. The only conflict was with #1323 inbind.rs/mod.rs, where I kept both: fold first, then the culprit markers around the dispatch.Hardware: NVIDIA GeForce RTX 5060 Ti 16 GB, driver 621.24, Agility SDK 1.620.2. CPU i7-14700KF, 64 GB RAM, Windows 10 22H2 (19045). Rust 1.88.0, release build with line tables. Game runs used
XCL_DRED=1 XCL_PSO_WAIT_MS=50 XCL_ACTIVITY=1; the run with this PR also hadXCL_GPU_CULPRIT=1.Before (
main930e8b4+ parts of the same stack, without #1195/#1428/#1323; two runs):DXGI_ERROR_DEVICE_HUNG(0x887A0006) at 112 s and 183 s.q4 end=signalin the first run,q2 end=signalin the second).ExecuteIndirectbetween dispatches and barriers. All other lists had 0 operations done. The page fault was at VA 0x0.With this PR (one run):
indirect dispatches past 65535 groups a dimension are folded or clamped on the GPUlogged at 96 s. That line only says the pass was set up.… indirect dispatches folded so farnor… had group counts clamped so farwas ever logged. As far asclamp::reportsaw, no dispatch was folded or clamped in this run.GPU wait chainline for the whole run.0x80000003atgame_scarlett_master.exe+0x4da6315(called from+0x9dff91) at 132 s;0xc0000005reading0xffffffffffffffffat+0x50705fcat 147 s.Update, a second run with this PR (same build, no DRED;
XCL_GPU_CULPRIT=1 XCL_PSO_WAIT_MS=50):1 indirect dispatches folded so far (the latest of 72604 groups in X)at 142 s. That is the same size as the counts in the description (72 512 / 75 072).GPU wait chainline afterwards.0x80000003at+0x4da6315.0x50000000/0x60000000bases) through the resource's map. The pointer it got was0xae99cec5ab88357b, which is garbage, so the resource's contents were not what the game expected.Unit tests:
cargo test --release -p xcl --lib -- sparse late_release bind culprit clamp --test-threads=4: 41 passed, 0 failed, 1 ignored. Three GPU tests printed SKIPPED with "no GPU" / "no GPU or DXC" in this run, includingclamp::tests::indirect_group_counts_are_folded_or_clamped_on_the_gpu, so that test was not covered here.Not tested:
scripts/smoke.ps1;The before and after runs differ in more than this PR:
mainmoved from930e8b4tob7aa9f3, and #1195/#1323 were added. #1195's skip message never appeared either.AI use: run, log analysis and this report by Claude Code (Claude Opus 5.5); posted at the request of the person running the tests.
Imported from ivall/xcl. Originally posted by lukastaro on 2026-11-24T16:54:28Z.
Thanks @nnonno91 and @gut0to, fixed in
cf6cc59(folded into the one commit): the GPU pass now computes the row count without the addition that wrapped, and folds only when it stays within 65 535, asbind::folddoes on the CPU; otherwise it clamps. The test covers 65 535², 65 535² + 1 andu32::MAXand checks each case againstbind::fold; it fails on the previous shader.Thanks also @Aniseto and @DarkPanda69 for the NVIDIA / AMD test runs, and @oz-stanislav-zhukov for the run on the title. Smoke run and the whole suite are redone on the new head (numbers in the description).
AI use: Claude Code (Claude Opus 5.5) wrote this.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T17:21:28Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.Thanks!
Imported from ivall/xcl. Originally posted by lukastaro on 2026-11-24T22:00:32Z.
Added "Part of #505" to the description, since this PR is about a stop at the world load (#1833) and has no
goal:world-loadlabel yet. On #675, @qcdaark found that the hang there is a different one (the fold path runs on that card, the hang stays), so this PR does not name #675 as fixed.AI use: Claude Code (Claude Opus 5.5) wrote this.
Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T11:35:32Z.
A gap I found while merging this for a test on AMD RDNA4: the fold is only undone on the HLSL path.
IO_GROUP_LIMITis read ingpu/recomp/emit.rsand nowhere undergpu/dxil(head280164a); the direct translator takes the group id as the hardware gives it (gpu/dxil/kernel.rs,group_id).bind.rsandclamp.rsfold for every translated compute pipeline, so withXCL_DIRECT_DXIL=1(and for the programs #2120 sends to the direct translator by default) a folded dispatch would run with the group ids of the folded grid instead of the console's. Before this change such a dispatch was clamped: groups were missing, but the ones that ran had the right ids.What is needed: the same unfolding in the direct translator's group and thread ids, with a GPU test like
gpu_compute_folded_dispatchon that path, or no fold for a pipeline built by it. This is from reading the code; I did not run a folded dispatch on the direct path.It also conflicts in
bind.rswith #2080 (two hunks, both easy).Tested:
9633138+ #2245's test fix + #2180 + #2029 + #1782 + this, AMD RDNA4, Windows, DXC 1.8.2502.11, debug,cargo test --workspace --no-fail-fast -- --test-threads=4: 1250 passed, 3 failed, 46 ignored, 7 SKIPPED. The 3 failures are onmainthere too (fuzz_validate_and_gpu_1and_3, #2115;gpu_image_get_resinfo_past_last_level). WithXCL_DIRECT_DXIL=all,cargo test -p xcl --lib gpu::: 629 passed, the same 3 failed, 22 ignored.AI use: Claude Code (Claude Opus 5.5) read the code, ran the tests and wrote this on the maintainer's behalf.
Imported from ivall/xcl. Originally posted by lukastaro on 2026-11-25T12:54:09Z.
@ivall Thanks, you were right: the fold was only undone on the HLSL path.
7dbd80cadds the same unfolding to both direct translators:gpu::dxil(compute_init) and the per-lane form inrecomp::lower. The groups past the console's count leave at once in both. The folded-dispatch GPU test now covers HLSL, direct (wave32, wave64, split wave64) and per-lane, and fails on the direct path without the fix. Currentmainis merged in. The #2080 overlap and the test numbers are in the description.AI use: Claude Code (Claude Opus 5.5) wrote the change and this comment.
Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T13:05:15Z.
The direct path's unfold is written and tested; it goes in with this PR. On
main1a0bbe3merged with280164a, plus a commit that adds the unfold to the direct translator (both the compact form and the per-lane form,kernel.rsunfold_groups/start):gpu_compute_folded_dispatch_runs_each_console_group_oncenow runs the HLSL and the direct program, 65 536 and 72 512 groups, wave32 and wave64: pass on AMD RDNA4.main), 46 ignored.Not merged yet: it changes the DXIL of every compute program, and I want a title run of the tree first.
AI use: Claude Code (Claude Opus 5.5) wrote the commit, ran the tests and wrote this on the maintainer's behalf.
Imported from ivall/xcl. Originally posted by upipibi on 2026-11-25T15:02:28Z.
For comparison, two other designs of this fix, in case cases are worth borrowing:
DispatchandExecuteIndirect. That covers x > 65,535 with y > 1, which this PR clamps (bind.rs, "any other count past 65 535 is clamped (logged once)"). The shader returns before its body wheneff_x >= asked_x, so padding groups do nothing even in side-effect-only programs. Its indirect test checks records such as 115,200 × 1 × 1 → [57600, 115200, 57600, 1, 2].Cases that might be worth a test here: x > 65,535 with y > 1 (clamped now), the same pipeline used by a direct and then an indirect dispatch, and a side-effect-only program whose padding groups must not write. Read from the PR texts and this diff only.
AI-assisted (Claude Code).
Imported from ivall/xcl. Originally posted by lucsoft on 2026-11-25T19:27:59Z.
Test report: Linux / RADV, RX 7800 XT (RDNA3). Head
7dbd80c, in a stack, not alone. Folding is required on this card for the title to get past world loading.main50a9fdeplus about 20 other PRs. The full list is in https://github.com/xcl-dev/xcl/issues/505#issuecomment-7170904791. #2205's culprit markers sit around the folded dispatch.568e7db: without this PR every run hung at about 131 000 dispatches. With it, runs went to 262 000–301 000 dispatches before an unrelated hang. With the current stack, runs pass 2 000 000 dispatches and reach gameplay, with no GPU-wait timeouts.AI use: Claude Code (Claude Opus 5.5) ran the analysis and drafted this. The runs were real, on the hardware above.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:13:17Z.
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Imported from ivall/xcl. Originally posted by lukastaro on 2026-11-28T14:46:51Z.
Merged current
main(b937fba) inc4252f1. main reworked the ABI binding, so the fold now goes through the new shape:Dispatch/DispatchXfold where main skipped the grid (other grids past 65 535 are still skipped), the indirect clamp pass runs before the binding is set (no rebind; Dispatch-only signatures only), and the HLSL/direct translators use the folded group ids for main's thread limits and the remap axis. Tests on an RTX 5060 Ti: the fold/clamp tests pass; the whole suite shows the same failures asmainon this machine and no new ones. The description is updated.AI use: Claude Code (Claude Opus 5.5) wrote the merge and this comment.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T16:23:19Z.
Review of head
c4252f1: a ready split-compute pipeline appears to bypass the new fold for a Dispatch-onlyExecuteIndirect.bind.rstriesdispatch_chain::execute_indirectbefore the clamp/fold pass and returns onOk(true). Once the indirect chain is ready, its slicer starts withmin(args.Load3(0), 65535). For[72_512, 1, 1], both its piece commands and whole fallback therefore cover at most 65,535 groups; the last 6,977 do not execute. While that chain is unready, the same call falls through to this PR's fold path. This is a source-level finding; I have not reproduced the ready-chain case on the GPU.The focused
gpu_compute_folded_dispatch_runs_each_console_group_onceandindirect_group_counts_are_folded_or_clamped_on_the_gputests each passed 1/1 on an RTX 3080 Ti (621.35), Windows 11 build 26300, withXCL_ADAPTER=3080, usingcargo test --offline --locked -j 4 -p xcl --lib <test name> -- --test-threads=1. They test the translator and clamp pass separately, but do not take the ready-chain route above.Could the split indirect path consume the same folded grid and original-count ABI value before slicing, or route an over-limit command through the folded whole path? A regression should make the indirect split variant ready, submit
[72_512, 1, 1], and verify every output group through 72,511 exactly once. This matters before merge because the result currently depends on whether pipeline preparation has finished.AI use: Codex (GPT-6.2 Sol) checked the routing and ran the focused GPU tests; Codex (GPT-6.2 Astra) independently traced the split path.
Local candidate follow-up. I made the slicer use the same GPU fold rule as the ordinary indirect path, write the original X count into this dispatch's IO, and partition the resulting physical grid for either its split pieces or whole fallback. The clamp opt-out retains valid split commands and forwards over-limit dimensions unchanged to the whole tail. The new GPU readback test failed on the unchanged head (0 passed, 1 failed: third slab empty for 72,512 × 1 × 1) and passed with the candidate. Six focused tests passed, 0 failed/ignored/skipped, including the existing translator, clamp, and scratch/lifetime controls.
With the three previously documented aborting UMA tests excluded,
cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4plus the same three--skipfilters gave 2,142 passed, 2 failed, 48 ignored, 25 GPU skip notices on the candidate; unchangedc4252f1gave 2,140 passed, 3 failed, 48 ignored, 25 skip notices. Both faileddirect_msaa_loads_precede_get_dimensionsandconsole_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk. The base alone also failedcross_queue_cycle_and_same_queue_fifo_do_not_deadlockin this run; I do not attribute that difference to the candidate. The new test accounts for one added pass. This is an uncommitted local patch. A single ready-chain-to-final-output test and a retail run remain untested.Candidate diff (six files)
Imported from ivall/xcl. Originally posted by lukastaro on 2026-11-30T21:49:43Z.
@thehollowedone thanks, you were right: a ready split chain bypassed the fold.
7b842ccmakes the slicer take the counts as the clamp pass does (withXCL_CLAMP_INDIRECT=1): folded into Y with the console's count in the dispatch's io, clamped, or none past the bound, and the folded grid cut into its slabs. It follows your candidate, with the fold rule shared as one HLSL function and the slicer recorded after the bind (it needs the io's address), the binding set again after it.split_indirect_slicer_folds_as_the_clamp_passfails on the previous slicer. The same commit fixes a fold with a wave-local remap in Y on the HLSL path. Since the fold itself is inmainthrough world-main, this PR is now that follow-up; the description is updated.AI use: Claude Code (Claude Opus 5.5) wrote the change and this comment.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-30T23:52:07Z.
merge-check
base:
d0832e614fhead:
7b842ccec2merge: clean
build: cargo build --workspace -> not run after the focused failure
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> not run after the focused failure; SKIPPED: 0 in the focused runs.
cargo test --offline --locked -p xcl --lib split_indirect_slicer_folds_as_the_clamp_pass --target-dir ..\target -- --nocapture --test-threads=1: stock test 1 passed; with the boundary case added to the unchanged PR logic, 0 passed and 1 failed; with the local candidate below, 1 passed, 0 failed, 0 ignored.review: The ready-chain slicer receives
indirect_guard::max_groups()without the extraFOLD_Xrow that both the ordinary clamp andbind::fold_counts_withinallow. At the default 4,194,304-group limit,[4,194,304, 1, 1]is valid. Its folded grid is[65,535, 65, 1]; the extra hardware groups in the last row are masked byIO_GROUP_LIMIT. The unchanged PR head instead wrote[0, 0, 0]to the whole-form command. The focused GPU assertion failed on that exact difference. The candidate passes the same boundary and keeps the test tied to the bound the ready-chain caller actually supplies. I read the complete eight-file diff. Full suite, paired smoke, and a title dispatch at this boundary remain untested.performance: No frame-time or world-load measurement. The change is in the opt-in indirect fold path; it restores valid groups currently dropped at the boundary.
verdict: not yet: the ready split-chain path drops a valid folded dispatch at the configured group limit.
hardware / tool and model: NVIDIA RTX 3080 Ti (621.40), Ryzen 7 9800X3D, Windows build 26300, rustc 1.99.1, DXC 1.8.2502.11 / OpenAI Codex (GPT-6.2 Sol) ran the GPU checks and prepared the candidate; OpenAI Codex (GPT-6.2 Astra) independently traced the boundary.
Candidate diff against PR head
Follow-up on the same head: the ready-chain branch returns before
indirect_guard::check. With the default 4,194,304-group limit,[65,535, 64, 1]is within the bound but[65,535, 65, 1]is not. I ran a temporary synthetic GPU slicer diagnostic with both inputs on the unchanged PR head: 0 passed, 1 failed, 0 ignored. For the latter, the slicer emitted[65,535, 65, 1]in the whole-form command, whereas the ordinary guard's source condition rejects that product. This inspected generated commands; it did not dispatch 4.26 million groups.Test scope correction: that diagnostic calls the slicer directly. It would still fail after the guard is correctly added in the caller, so the diagnostic is not an acceptance regression for this fix. The earlier padded-fold candidate also does not address this gap.
A complete fix should run the guard after the split path's last
Wholefallback and before it binds the chain ABI. Feed the checked output's GPU address plus slot offset to the slicer. The slicer reads through an SRV, so transition that buffer from UAV toNON_PIXEL_SHADER_RESOURCEfor the read, then toCOMMONafterward even if slicer setup fails. Preserve the original address when the guard is off and the ordinary guard path when the chain falls back toWhole; do not check a command twice. An end-to-end regression should enterbind::execute_indirectwith an isolated low group limit, check accepted and rejected counts with fold on and off, and inspect the resulting commands or readback. I have not run that integration regression.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:42:55Z.
Triage (#1607) – head
7b842ccNo open or merged PR does this. #2404 (split program ExecuteIndirect) is a different change: its slicer still uses
min(args, 65535)and never folds.No problems found in the diff. Two separate fixes are in one PR: the
gid.y / ratiorow for a folded dispatch with a Y remap (emit.rs), and folding in the indirect slicer (pso.rs,clamp.rs,dispatch_chain.rs). Each has its own test, but they could be reviewed as two PRs.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.