indirect clamp: count dispatch records by width and log them (RT-INDIRECT-DISPATCH-COUNTERS) #2408
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2408
Loading…
Reference in a new issue
No description provided.
Delete branch "dispatch-width-counters"
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 successfully merged and closed
The indirect clamp now counts dispatch records by width and logs them, so a run shows how wide the title's dispatches are and whether a device's limit cuts any. This is the follow-up the review of #2230 asked for.
Claimed in the coordination issue as: RT-INDIRECT-DISPATCH-COUNTERS
What changes
indirect_clamp.comp: stats words 12 to 15 count the dispatch records, those wider than 65,535 groups in x, the widest x that runs, and those cut at the device's limits.vulkan_indirect_clamp.h: reads the new counters with the others and prints one line every 10 s while dispatch records are clamped:indirect clamp dispatch: N records, W wider than 65535 groups in x, widest x X, C cut at the device's limits (x x y x z).indirect_clamp_spv.h: regenerated from the shader as its header says (glslangValidator 16.6.0).docs/d3d12_vulkan.mdsection 4.7: the bound per dimension is the device's (it still said 65,535), the new line, and the test.No behaviour changes: the clamp decides exactly as after #2230.
Why
maxComputeWorkGroupCount. Nothing told us whether the title issues dispatches wider than 65,535, or when a device's own limit still cuts one (llvmpipe allows 65,535 in x; RADV allows 2^32 - 1).crates/victory-gpu/src/indirect.rsin VIctory-Belobug-AMD; no code of it is used).Tests
indirect_clamp_testcases 6b and 6c check the counters with a 70,000 x 1 x 1 record: counted as wider than 65,535 where the device runs it, and as cut where it does not. Run with the validation layer on llvmpipe, the Ryzen 9 7950X3D iGPU and the RX 7900 XTX (RADV, Mesa 26.3.1), with a clean kernel log.tests/test_indirect_clamp_telemetry.pychecks the new counters.ctest: 114/114. Windows suite under Wine: 488 tests, none changed againstmain.World run
RX 7900 XTX, RADV, Wine, about four minutes:
22494 records, 0 wider than 65535 groups in x, widest x 28800, 0 cut at the device's limits (4294967295 x 65535 x 65535). In that run no dispatch reached the old bound.Not tested
AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)
Merging. This is a self-merge.
indirect_clamp_testwith the validation layer on llvmpipe, the integrated RDNA2 GPU and the RX 7900 XTX (RADV, Mesa 26.3.1); Linuxctest114/114; the Windows suite under Wine with no test changed againstmain; the telemetry, registration, docs, line-ending and game-data checks.AI-assisted (Claude Code, Claude Opus 5.5 and Claude Fable 5.2)