Repository navigation
Experiment with console thread IDs on wave32 GPUs - #1
Draft
oceansde012 wants to merge 4 commits into
Draft
oceansde012 wants to merge 4 commits into
oceansde012 wants to merge 4 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.