Console flow on 32-lane hosts needs separate exchanges for two logical wave64s #2688

Open
opened 2026-11-26 05:12:03 +00:00 by github-bot · 2 comments
Owner

@⁠carlosmegino on GitHub · 2026-11-25 18:15 UTC · original

The exact 128-thread compute case on an RTX 5070 Ti (32 physical lanes) reaches the emitter at 3fab5a19f586c690fedf4578c1fb7b4c2de298dd. It stops with “console wave64 lanes in a group of more than 64 threads on a host without 64-lane waves”. No DXIL or PSO is produced.

The 64-thread case is the control. With the scalar SRV correction, a bounded dispatch with five synthetic SRVs, seven UAVs and one guest CBV matched a CPU reference for all seven UAV readbacks. Canaries stayed intact and D3D12 GPU-based validation reported zero warnings or errors. The older fork also accepted a test variant using its native CBV ABI. Visual and frame-time comparisons remain pending.

The existing exchange uses two LDS slots and thread-group barriers. A 128-thread group contains two logical wave64s, each backed by two physical waves. Each pair needs isolated exchange storage and logical EXEC state. If the two logical waves diverge or loop independently, their barrier participation must still converge at group scope. Indexing four slots alone leaves that synchronization problem.

Start with a synthetic 128-thread fixture that assigns different masks, LDS values and loop counts to the two logical waves. Verify per-lane results against a CPU oracle, including masked cross-half exchanges, and check the fixture with D3D12 GPU-based validation before replaying the exact case.

@⁠r4tedx, for the console-flow LDS branch, the independent timestamp/readback microbenchmark is based on the same branch. On this RTX 5070 Ti, medians over twelve samples per arm for 2,048 groups were 2.86 µs for emulation and 3.33 µs for the explicit wave32 reference. The ranges overlapped and the barrier encodings differed.

Related NVIDIA wave64 reports are #1132 and #2220. This report isolates the two-logical-wave case on the pinned console-flow branch.

**@⁠carlosmegino** on GitHub · 2026-11-25 18:15 UTC · [original](https://github.com/Marvisak/VIctory/issues/2688) The exact 128-thread compute case on an RTX 5070 Ti (32 physical lanes) reaches the emitter at `3fab5a19f586c690fedf4578c1fb7b4c2de298dd`. It stops with “console wave64 lanes in a group of more than 64 threads on a host without 64-lane waves”. No DXIL or PSO is produced. The 64-thread case is the control. With the [scalar SRV correction](https://github.com/r4tedx/VIctory/pull/18), a bounded dispatch with five synthetic SRVs, seven UAVs and one guest CBV matched a CPU reference for all seven UAV readbacks. Canaries stayed intact and D3D12 GPU-based validation reported zero warnings or errors. The older fork also accepted a test variant using its native CBV ABI. Visual and frame-time comparisons remain pending. The existing exchange uses two LDS slots and thread-group barriers. A 128-thread group contains two logical wave64s, each backed by two physical waves. Each pair needs isolated exchange storage and logical EXEC state. If the two logical waves diverge or loop independently, their barrier participation must still converge at group scope. Indexing four slots alone leaves that synchronization problem. Start with a synthetic 128-thread fixture that assigns different masks, LDS values and loop counts to the two logical waves. Verify per-lane results against a CPU oracle, including masked cross-half exchanges, and check the fixture with D3D12 GPU-based validation before replaying the exact case. @⁠r4tedx, for the console-flow LDS branch, the independent [timestamp/readback microbenchmark](https://github.com/carlosmegino/ztrx/commit/9ae78c7) is based on the same branch. On this RTX 5070 Ti, medians over twelve samples per arm for 2,048 groups were 2.86 µs for emulation and 3.33 µs for the explicit wave32 reference. The ranges overlapped and the barrier encodings differed. Related NVIDIA wave64 reports are [#1132](https://git.gtahub.st/github/Marvisak--VIctory/issues/1132) and [#2220](https://git.gtahub.st/github/Marvisak--VIctory/issues/2220). This report isolates the two-logical-wave case on the pinned console-flow branch.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:12:03 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 18:48 UTC · original

Automated triage for the maintainers.

This is a design note about a branch in a fork (the "console flow" work at 3fab5a19), not about this repository's main: that commit is not in main, and main has no "console wave64 lanes in a group of more than 64 threads" refusal. Kept as a request about emulating 64-lane waves on 32-lane hosts, which fits the project's scope (Windows hosts such as NVIDIA cards). The NVIDIA wave64 problem in main is tracked in #2220 (and #1132). If the branch is meant for this repository, a PR here with the proposed synthetic 128-thread test is the way to have it reviewed.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 18:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/2688#issuecomment-7171422053) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T18:15:43Z at=2026-11-25T18:50:15Z --> Automated triage for the maintainers. This is a design note about a branch in a fork (the "console flow" work at `3fab5a19`), not about this repository's main: that commit is not in main, and main has no "console wave64 lanes in a group of more than 64 threads" refusal. Kept as a request about emulating 64-lane waves on 32-lane hosts, which fits the project's scope (Windows hosts such as NVIDIA cards). The NVIDIA wave64 problem in main is tracked in #2220 (and #1132). If the branch is meant for this repository, a PR here with the proposed synthetic 128-thread test is the way to have it reviewed. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠carlosmegino on GitHub · 2026-11-26 11:27 UTC · original

Thanks for the clarification.

I've added the proposed synthetic regression against VIctory main in #3180, covering 64- and 128-thread groups with independent EXEC masks, loop counts, LDS regions and cross-half lane reads.

On my RTX 5070 Ti, the 64-thread case requests a native wave64 PSO that the adapter cannot create, while the 128-thread case executes but returns 0 instead of 40 in UAV 2, lane 0.

I also reproduced a separate masked v_readfirstlane_b32 selection defect on fxceless/victory-fork#854 and #994 and submitted a fix in PiloteCode/victory-fork#1.

With the paired backend and the selection fix, both group sizes matched the CPU reference across all seven UAVs, with intact canaries and zero D3D12 GPU validation warnings or errors.

All tests use synthetic inputs. Gameplay stability and frame-time impact remain unmeasured.

Feedback on the regression and its suitability for #2220 would be welcome.

**@⁠carlosmegino** on GitHub · 2026-11-26 11:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/2688#issuecomment-7190756625) Thanks for the clarification. I've added the proposed synthetic regression against VIctory `main` in #3180, covering 64- and 128-thread groups with independent EXEC masks, loop counts, LDS regions and cross-half lane reads. On my RTX 5070 Ti, the 64-thread case requests a native wave64 PSO that the adapter cannot create, while the 128-thread case executes but returns 0 instead of 40 in UAV 2, lane 0. I also reproduced a separate masked `v_readfirstlane_b32` selection defect on fxceless/victory-fork#854 and #994 and submitted a fix in PiloteCode/victory-fork#1. With the paired backend and the selection fix, both group sizes matched the CPU reference across all seven UAVs, with intact canaries and zero D3D12 GPU validation warnings or errors. All tests use synthetic inputs. Gameplay stability and frame-time impact remain unmeasured. Feedback on the regression and its suitability for #2220 would be welcome.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#2688
No description provided.