Shaders: four more 64-thread LDS programs taken wave-wide on 32-lane hosts #101

Merged
ballsimulation merged 1 commit from upstream-pr/101 into main 2026-11-28 19:01:28 +00:00
ballsimulation commented 2026-11-27 18:06:29 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ballsimulation on 2026-11-27T18:06:29Z.


Four compute programs of 1.0.2.1 are refused on every run on an RTX card ("no wave32 lowering for this wave64 program"), and their dispatches are dropped:

pipeline hash branches taken wave-wide
5e3dd99e0f067aee 4
ae0deeafe219c15c 5
a10179ab7eda0dc3 15
57f1b81de55c2842 15

They have the shape of the volumetric programs already in scene_kernel (emit/mod.rs): groups of 64, with an LDS read and write in one lane-branch region, so no other form translates them on 32-lane hosts. With VICTORY_WAVE_WIDE=1 all four translate. This adds them to that list by digest, so only these four change. VICTORY_WAVE_WHY now also prints a refused program's digest, which is what the list needs.

Still refused: 6b82bc7d22016cb5 (groups of 1024). Its console waves' meetings need LDS past the host's 32 KiB.

Checked on an RTX 4070 (driver 610.74, Windows 11), Series S profile at 1440p with DLSS Performance:

  • victory translate --warm with VICTORY_HOST_WAVE=32: 1 of the 5 refused programs left, down from 5 of 5.
  • About 30 minutes of play over several runs with the four made: no device loss, no new warnings.
  • cargo test -p victory-shader and cargo clippy -p victory-shader --all-targets -- -D warnings pass.

Not checked: a before/after picture. I have not found which passes these programs feed. Mind the note in scene_kernel about VICTORY_WAVE_WIDE=1 and the device losses in runs 121-124; this applies the widened form only to these four digests, not globally.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5531119917 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/101). Originally posted by [ballsimulation](https://github.com/ballsimulation) on 2026-11-27T18:06:29Z. --- Four compute programs of 1.0.2.1 are refused on every run on an RTX card ("no wave32 lowering for this wave64 program"), and their dispatches are dropped: | pipeline hash | branches taken wave-wide | |---|---| | `5e3dd99e0f067aee` | 4 | | `ae0deeafe219c15c` | 5 | | `a10179ab7eda0dc3` | 15 | | `57f1b81de55c2842` | 15 | They have the shape of the volumetric programs already in `scene_kernel` (`emit/mod.rs`): groups of 64, with an LDS read and write in one lane-branch region, so no other form translates them on 32-lane hosts. With `VICTORY_WAVE_WIDE=1` all four translate. This adds them to that list by digest, so only these four change. `VICTORY_WAVE_WHY` now also prints a refused program's digest, which is what the list needs. Still refused: `6b82bc7d22016cb5` (groups of 1024). Its console waves' meetings need LDS past the host's 32 KiB. **Checked** on an RTX 4070 (driver 610.74, Windows 11), Series S profile at 1440p with DLSS Performance: - `victory translate --warm` with `VICTORY_HOST_WAVE=32`: 1 of the 5 refused programs left, down from 5 of 5. - About 30 minutes of play over several runs with the four made: no device loss, no new warnings. - `cargo test -p victory-shader` and `cargo clippy -p victory-shader --all-targets -- -D warnings` pass. **Not checked:** a before/after picture. I have not found which passes these programs feed. Mind the note in `scene_kernel` about `VICTORY_WAVE_WIDE=1` and the device losses in runs 121-124; this applies the widened form only to these four digests, not globally. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Aniseto commented 2026-11-27 18:31:30 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Aniseto on 2026-11-27T18:31:30Z.


Ran the full victory-shader suite on an NVIDIA Blackwell part at 2b028ea:

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 19.44.35230, DXC 1.9.2609.5, debug build, VICTORY_REQUIRE_HW_GPU=1.

cargo test -p victory-shader --lib -- --test-threads=4
288 passed; 0 failed; 4 ignored      (exit 0)

This is a Blackwell wave32 host with VICTORY_REQUIRE_HW_GPU set, so hardware-backed tests ran on the real D3D12 device rather than skipping. The PR's Checked section names an RTX 4070; this adds a different adapter, driver and toolchain. No game data was used: the suite is synthetic.

Not tested: the four ignored tests (benchmark, strict-joins switch, probe tool, f16 conversion mode), AMD/Intel adapters, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR head in a detached worktree, ran the command above and wrote this report; no game data was used.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7225576859 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/101#issuecomment-7225576859). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-27T18:31:30Z. --- Ran the full victory-shader suite on an NVIDIA Blackwell part at 2b028ea: 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 19.44.35230, DXC 1.9.2609.5, debug build, VICTORY_REQUIRE_HW_GPU=1. ``` cargo test -p victory-shader --lib -- --test-threads=4 288 passed; 0 failed; 4 ignored (exit 0) ``` This is a Blackwell wave32 host with VICTORY_REQUIRE_HW_GPU set, so hardware-backed tests ran on the real D3D12 device rather than skipping. The PR's Checked section names an RTX 4070; this adds a different adapter, driver and toolchain. No game data was used: the suite is synthetic. Not tested: the four ignored tests (benchmark, strict-joins switch, probe tool, f16 conversion mode), AMD/Intel adapters, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR head in a detached worktree, ran the command above and wrote this report; no game data was used.
The-DarkMatter commented 2026-11-28 02:03:23 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by The-DarkMatter on 2026-11-28T02:03:23Z.


I tried a more general version of this on top of 64d4931. Instead of adding digests to the scene_kernel list, emit tries widen as the very last resort for any group of 64 threads (one console wave) that no other form translates. Programs that translate today don't change: every module that translated before keeps its hash, so it only touches programs that would be dropped anyway. VICTORY_WAVE_WIDE_LAST=0 turns it off.

Full translate over 1.0.2.1 with VICTORY_HOST_MAX_WAVE=32:

  • "no wave32 lowering": 24 → 5 (it was 22 at d12eb1b)
  • compute programs translated: 2734 → 2753 of 2763

The last resort picks up your four plus 13 more: 6871d6e4b3ac9a10, 18d957e62926ed3e, 407eca669212d400, 9fe711566bec0d0a, a40ae27594631121, 2889c21328c69e58, 888af37a584acf98, ffa3a7645374474b, aeac9d880daff3ba, a4cb3ce527ad8569, 98fef92f7a6d825e, a09f0c1fae2b5ca3, f38f83439083b9ef. The other part of my change is the same fix as #560 (the loop retry that still wants 64 lanes dropping widen's blocks), which is why 926c46bab3b86bd6 and 02384a60fda6f2d0 come back here too.

All 19 newly translated programs pass the DXIL validator and create pipelines on an RTX 5080 (driver 621.1). cargo test -p victory-shader and cargo xtask policy pass, with two new synthetic tests in wave64_tests.rs.

Big caveat: I haven't play-tested the general form yet. With the device losses in runs 121-124 in mind, your named list is the safer step until someone plays with it. If the general version is wanted, I can open it as a PR on top of #560.

Still refused here: 6b82bc7d22016cb5 and 6832a9da15c2e584 (LDS is full, #348 looks at those), and 22338086ea4c5364, 1d434307d981352a, 3b02415f67c6b0d8 (groups of 128 and 512, which only go through with VICTORY_WAVE_WIDE=1).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7232099094 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/101#issuecomment-7232099094). Originally posted by [The-DarkMatter](https://github.com/The-DarkMatter) on 2026-11-28T02:03:23Z. --- I tried a more general version of this on top of 64d4931. Instead of adding digests to the `scene_kernel` list, `emit` tries `widen` as the very last resort for any group of 64 threads (one console wave) that no other form translates. Programs that translate today don't change: every module that translated before keeps its hash, so it only touches programs that would be dropped anyway. `VICTORY_WAVE_WIDE_LAST=0` turns it off. Full `translate` over 1.0.2.1 with `VICTORY_HOST_MAX_WAVE=32`: - "no wave32 lowering": 24 → 5 (it was 22 at d12eb1b) - compute programs translated: 2734 → 2753 of 2763 The last resort picks up your four plus 13 more: `6871d6e4b3ac9a10`, `18d957e62926ed3e`, `407eca669212d400`, `9fe711566bec0d0a`, `a40ae27594631121`, `2889c21328c69e58`, `888af37a584acf98`, `ffa3a7645374474b`, `aeac9d880daff3ba`, `a4cb3ce527ad8569`, `98fef92f7a6d825e`, `a09f0c1fae2b5ca3`, `f38f83439083b9ef`. The other part of my change is the same fix as #560 (the loop retry that still wants 64 lanes dropping widen's blocks), which is why `926c46bab3b86bd6` and `02384a60fda6f2d0` come back here too. All 19 newly translated programs pass the DXIL validator and create pipelines on an RTX 5080 (driver 621.1). `cargo test -p victory-shader` and `cargo xtask policy` pass, with two new synthetic tests in `wave64_tests.rs`. Big caveat: I haven't play-tested the general form yet. With the device losses in runs 121-124 in mind, your named list is the safer step until someone plays with it. If the general version is wanted, I can open it as a PR on top of #560. Still refused here: `6b82bc7d22016cb5` and `6832a9da15c2e584` (LDS is full, #348 looks at those), and `22338086ea4c5364`, `1d434307d981352a`, `3b02415f67c6b0d8` (groups of 128 and 512, which only go through with `VICTORY_WAVE_WIDE=1`).
ballsimulation commented 2026-11-28 12:47:00 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ballsimulation on 2026-11-28T12:47:00Z.


Still needed on current main (63b902fe). A run today still refuses 5e3dd99e0f067aee, ae0deeafe219c15c and 57f1b81de55c2842 with "no wave32 lowering", and drops their dispatches. The branch still merges cleanly.

@The-DarkMatter, thanks for the general version. I agree the named list is the safer first step. If yours lands on top of #560, it covers these four too, and this PR can be closed then.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7239463059 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/101#issuecomment-7239463059). Originally posted by [ballsimulation](https://github.com/ballsimulation) on 2026-11-28T12:47:00Z. --- Still needed on current main (63b902fe). A run today still refuses `5e3dd99e0f067aee`, `ae0deeafe219c15c` and `57f1b81de55c2842` with "no wave32 lowering", and drops their dispatches. The branch still merges cleanly. @The-DarkMatter, thanks for the general version. I agree the named list is the safer first step. If yours lands on top of #560, it covers these four too, and this PR can be closed then.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!101
No description provided.