Skip to content

Experiment with console thread IDs on wave32 GPUs - #1

Draft
oceansde012 wants to merge 4 commits into
vlad/picksfrom
port/wave32-compute
Draft

oceansde012 wants to merge 4 commits into
vlad/picksfrom
port/wave32-compute

Conversation

@oceansde012

@oceansde012 oceansde012 commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Adapt fxceless/victory-fork#1261 with original authorship, add GroupInfo consistency and repair an existing test syntax error. The experimental behavior requires VICTORY_THREAD_TICKET=1; the default remains the legacy path.

On RTX 5060 Ti, synthetic 32x2 and 32x2x2 dispatches reproduced missing and duplicate IDs before the patch and produced unique IDs with consistent GroupInfo afterward; 16x3 and 8x5 partial cases also passed. Final head df37ea8: full shader suite 288 passed, 4 ignored; 14 wave tests, strict shader Clippy and byte-comparison against default baseline on four fixtures passed. Offline locked release built with 12 GPU warnings. No game or game assets were used.

Draft: the experimental algorithm assumes maximal host wave packing before the tail; arbitrary hardware packing, lane-sensitive shaders and in-game results are not established. The existing XCL GPL-2.0-only provenance in the base fork also requires review before distributing or merging.

oceansde012 and others added 4 commits November 26, 2026 13:10
The packed-dot regression in df5370e was inserted before the enclosing function closed, preventing Windows shader tests from compiling.
A wave32 host can put the first threads of different waves in the same aligned block of flattened IDs. Allocate aligned spans from a per-group LDS counter. Count partial waves separately so their arrival cannot misalign a full wave.

Limit the new counter to multidimensional wave32 groups that need console lanes and have an available LDS dword. Keep the existing split-wave64 allocation and use the same partial-wave handling there. VICTORY_THREAD_TICKET=0 restores rounded IDs for the new path and participates in the shader fingerprint.

Use synthetic atomic UAV counters to detect missing and duplicate IDs in 2D, 3D, and partial-wave groups. Verify when the counter is emitted without changing the process environment.

Upstream-PR: fxceless/victory-fork#1261
Upstream-Commit: 61f7df74b486134b069d5cfbfe6dfe55ac45613b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Group-info SGPR bits 6–11 describe the console wave. When the LDS counter relabels threads, derive the wave ID from that same flat coordinate so the SGPR and the thread-coordinate VGPRs agree.

Extend the synthetic dispatches to record and verify the wave count and wave ID. Cover 32x2, 32x2x2 and partial groups in both console wave modes.
An explicit VICTORY_THREAD_TICKET=1 enables the experimental counter. DXIL wave size does not guarantee maximal active-lane packing at entry, which the tail calculation assumes.

Keep the original split-wave64 counter and group-info lowering in the default path. Apply the experimental counter and corresponding group-info coordinates together when enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants