GPU: pipeline workers take their count from VICTORY_PIPELINE_THREADS #2250

Open
github-bot wants to merge 3 commits from github-bot/gh-2250 into main AGit
Owner

@⁠kotekompotek on GitHub · 2026-11-25 08:51 UTC · original
kotekompotek:gpu/pipeline-threads-env → main · +52 −7 · 4 files · 3 commits · open

Summary

Diagnostic knob for #2124 (kept open — the real fix is deeper): AMD's shader compiler (amdxc64.dll) crashes when several threads compile pipelines concurrently on RDNA4. The reporter found one worker delays rather than removes the crash, and bisected the trigger to c75fdba.

VICTORY_PIPELINE_THREADS bounds that concurrency everywhere pipelines are made, useful for narrowing the trigger and for hosts that need serial compilation now:

  • Runtime: the number of pipeline workers (pipeline::make::queue). 1 serialises compilation; 0 makes pipelines on the calling thread, as when no worker can be spawned.

  • Offline: victory translate sizes its scoped workers by --jobs; when --jobs is unset it now falls to the same env value (0 maps to one worker — translate cannot run with none), then to available_parallelism. An explicit --jobs N still wins.

  • Unset: unchanged — runtime workers stay half the logical processors clamped to 2–8, translate stays available_parallelism.

  • Unparseable: warning, unchanged defaults.

  • Documented in the README env table as a diagnostic, not a workaround.

Test plan

  • cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warnings — clean
  • cargo test -p victory-gpu --locked --lib pipeline — 16 passed
  • Reviewer-verified merged on main: clippy workspace + --all-features clean, cargo test --workspace --locked 701 passed / 0 failed / 10 ignored

Refs #2124

**@⁠kotekompotek** on GitHub · 2026-11-25 08:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250) `kotekompotek:gpu/pipeline-threads-env` → `main` · +52 −7 · 4 files · 3 commits · open ## Summary Diagnostic knob for #2124 (kept open — the real fix is deeper): AMD's shader compiler (`amdxc64.dll`) crashes when several threads compile pipelines concurrently on RDNA4. The reporter found one worker delays rather than removes the crash, and bisected the trigger to `c75fdba`. `VICTORY_PIPELINE_THREADS` bounds that concurrency everywhere pipelines are made, useful for narrowing the trigger and for hosts that need serial compilation now: - **Runtime:** the number of pipeline workers (`pipeline::make::queue`). `1` serialises compilation; `0` makes pipelines on the calling thread, as when no worker can be spawned. - **Offline:** `victory translate` sizes its scoped workers by `--jobs`; when `--jobs` is unset it now falls to the same env value (`0` maps to one worker — translate cannot run with none), then to `available_parallelism`. An explicit `--jobs N` still wins. - Unset: unchanged — runtime workers stay half the logical processors clamped to 2–8, translate stays `available_parallelism`. - Unparseable: warning, unchanged defaults. - Documented in the README env table as a diagnostic, not a workaround. ## Test plan - `cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warnings` — clean - `cargo test -p victory-gpu --locked --lib pipeline` — 16 passed - Reviewer-verified merged on main: clippy workspace + `--all-features` clean, `cargo test --workspace --locked` 701 passed / 0 failed / 10 ignored Refs #2124
On some host/driver pairs the driver's compiler is not safe to call
from several threads at once: on AMD RDNA4 the amdxc64 compiler
crashes while pipelines compile in parallel, and one worker avoids it.
The variable sets the worker count (0 makes pipelines on the calling
thread); unset, half the logical processors, 2 to 8, as before.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The issue's reproducer is offline: `translate --pipelines` crashed in
amdxc64 on RDNA4, and translate sizes its own scoped workers by --jobs,
so the env never reached it. An unset --jobs now falls to the same
VICTORY_PIPELINE_THREADS the pipeline workers read (0 means one worker
there, since translate cannot run without any), covering both paths with
one setting.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
One worker serialises amdxc64 calls but the RDNA4 reporter's run still
died with the same fault — the wording promised more than the knob does.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:59:54 +00:00
Author
Owner

@⁠rpmaster2 on GitHub · 2026-11-25 08:54 UTC · original

A warning from the reporter side: one worker delays this crash but does not remove it, so please do not land this as the fix for #2124.

I added the same knob locally while triaging #2124 and tested it before the bisect:

  • VICTORY_PIPELINE_THREADS=1, main @⁠940d32f, diag build, --console series-x: 420 s with no exception (2,608 draws/frame) - which looked like a fix;
  • a longer run on the same build (900 s cap): died with the same 0xc0000005 at amdxc64.dll+0x861b9f, at 1,710 draws/frame.

So serialising the workers shifts when it happens, not whether it happens. The bisect then found the actual trigger: c75fdba ("GPU: views the shaders pick from the heap, and one change journal for title memory") - its parent 4f57f46 runs clean, and c75fdba dies at 14 draws/frame. Full details in #2124.

The env var itself is still useful (it is what made the offline translate --pipelines reproducer think it had passed once, and people will want to try it), but the description claiming "avoids the crash" should say "delays it" at most, or the workaround gets credited with a fix it does not provide.

Also worth noting for the triage: a user on the fxceless fork with an RX 7900 XT (RDNA3) is reaching the prologue boat chase (#2248), while on RDNA4 the same fork dies in amdxc64 at startup - so this may be RDNA4-specific rather than "AMD".

AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.

**@⁠rpmaster2** on GitHub · 2026-11-25 08:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7157622852) A warning from the reporter side: one worker delays this crash but does not remove it, so please do not land this as the fix for #2124. I added the same knob locally while triaging #2124 and tested it before the bisect: - `VICTORY_PIPELINE_THREADS=1`, `main` @⁠940d32f, diag build, `--console series-x`: 420 s with **no** exception (2,608 draws/frame) - which looked like a fix; - a longer run on the same build (900 s cap): died with the same `0xc0000005 at amdxc64.dll+0x861b9f`, at 1,710 draws/frame. So serialising the workers shifts when it happens, not whether it happens. The bisect then found the actual trigger: `c75fdba` ("GPU: views the shaders pick from the heap, and one change journal for title memory") - its parent `4f57f46` runs clean, and `c75fdba` dies at 14 draws/frame. Full details in #2124. The env var itself is still useful (it is what made the offline `translate --pipelines` reproducer think it had passed once, and people will want to try it), but the description claiming "avoids the crash" should say "delays it" at most, or the workaround gets credited with a fix it does not provide. Also worth noting for the triage: a user on the fxceless fork with an RX 7900 XT (RDNA3) is reaching the prologue boat chase (#2248), while on RDNA4 the same fork dies in amdxc64 at startup - so this may be RDNA4-specific rather than "AMD". AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.
Author
Owner

@⁠Dathinel on GitHub · 2026-11-25 08:55 UTC · original

The offline command in #2124 has a separate worker pool. At 38e352c, the new environment variable is read by pipeline/make.rs::queue. The ordinary translate --pipelines path instead sizes its scoped workers in apps/victory/src/translate.rs from --jobs or available_parallelism; those workers call the shader host's pipeline methods directly.

I added one trace at CLI worker entry and ran the Windows diagnostics binary twice against the same file containing four synthetic DXBC headers. With VICTORY_PIPELINE_THREADS=1, plain translate --pipelines started 4 distinct CLI workers. Adding --jobs 1 started 1. Both runs counted four containers; the fixtures had no programs, so this measures worker selection only.

Please distinguish the runtime setting from the offline reproducer in the description. For a controlled single-CLI-worker comparison on this head, use victory translate --pipelines --jobs 1. This test makes no claim about the AMD driver outcome. AI-assisted validation.

**@⁠Dathinel** on GitHub · 2026-11-25 08:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7157638336) The offline command in #2124 has a separate worker pool. At 38e352c, the new environment variable is read by pipeline/make.rs::queue. The ordinary translate --pipelines path instead sizes its scoped workers in apps/victory/src/translate.rs from --jobs or available_parallelism; those workers call the shader host's pipeline methods directly. I added one trace at CLI worker entry and ran the Windows diagnostics binary twice against the same file containing four synthetic DXBC headers. With VICTORY_PIPELINE_THREADS=1, plain translate --pipelines started **4 distinct CLI workers**. Adding --jobs 1 started **1**. Both runs counted four containers; the fixtures had no programs, so this measures worker selection only. Please distinguish the runtime setting from the offline reproducer in the description. For a controlled single-CLI-worker comparison on this head, use **victory translate --pipelines --jobs 1**. This test makes no claim about the AMD driver outcome. AI-assisted validation.
Author
Owner

@⁠dcastell1 on GitHub · 2026-11-25 08:56 UTC · original

Verified on native Windows (no Wine): NVIDIA GeForce RTX 5090 (driver 621.24), Windows 11 10.0.26300, Rust 1.98.1, MSVC 14.44.35207, debug build. 940d32f6 is your base and it is what this box has.

patch -p1 < this PR            # clean, no fuzz
cargo test --workspace
219 passed; 2 failed; 7 ignored   (exit 101)

Both failures are the pre-existing ones on 940d32f6 on this box, not this PR: descriptor::host::tests::dynamic_slots_are_held_until_released (host.rs:1486, NumDescriptors >= HEAP_VIEWS) and memory::tests::lists_share_a_table_and_copies_keep_their_views (memory.rs:673, "past the dynamic slots"). Both are the 1,000,000-descriptor cap reported in #1760; the baseline gives the same two. Nothing else moves: taking the worker count from VICTORY_PIPELINE_WORKERS changes no verdict here.

Tree restored afterwards; no game data.

**@⁠dcastell1** on GitHub · 2026-11-25 08:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7157675259) Verified on native Windows (no Wine): NVIDIA GeForce RTX 5090 (driver 621.24), Windows 11 10.0.26300, Rust 1.98.1, MSVC 14.44.35207, debug build. `940d32f6` is your base and it is what this box has. ``` patch -p1 < this PR # clean, no fuzz cargo test --workspace 219 passed; 2 failed; 7 ignored (exit 101) ``` **Both failures are the pre-existing ones on `940d32f6` on this box, not this PR**: `descriptor::host::tests::dynamic_slots_are_held_until_released` (`host.rs:1486`, `NumDescriptors >= HEAP_VIEWS`) and `memory::tests::lists_share_a_table_and_copies_keep_their_views` (`memory.rs:673`, "past the dynamic slots"). Both are the 1,000,000-descriptor cap reported in #1760; the baseline gives the same two. Nothing else moves: taking the worker count from `VICTORY_PIPELINE_WORKERS` changes no verdict here. Tree restored afterwards; no game data.
Author
Owner

@⁠rpmaster2 on GitHub · 2026-11-25 08:57 UTC · original · edited 2026-11-25 08:59 UTC

@⁠Dathinel You are right, and thank you - the offline and runtime paths are different pools, and my earlier comment blurred them.

To separate them explicitly:

  • Runtime: VICTORY_PIPELINE_THREADS=1 does reach pipeline/make.rs::queue. I ran main @⁠940d32f with it, --console series-x: 420 s with no exception, then the 900 s cap run died with the same 0xc0000005 at amdxc64.dll+0x861b9f at 1,710 draws/frame. That is the "delays, does not remove" claim, and it is about the runtime only.
  • Offline reproducer: it uses the CLI's scoped workers sized by --jobs (as you say), so VICTORY_PIPELINE_THREADS never applied to my bisect signal. The bisect is still valid as a signal (good commits reach 100%, bad ones die at ~86%), but I cannot attribute it to the runtime knob.
  • Your point also suggests a test I have not run: translate --pipelines --jobs 1 on 940d32f. If the CLI crash disappears at one worker, then the offline failure is CLI-side concurrency and the runtime story is separate; if it still dies, the driver is choking on some DXIL regardless of concurrency. It is slow (the no-pipeline pass alone takes ~10 minutes here with the default jobs), so I will report it when I have a result rather than guess now.

I have edited nothing in the PR, but if the description still says the env "avoids the crash" for the offline reproducer, it should say "runtime only, and it delays rather than avoids" - which matches what I see.

AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.

**@⁠rpmaster2** on GitHub · 2026-11-25 08:57 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7157690857) · edited 2026-11-25 08:59 UTC @⁠Dathinel You are right, and thank you - the offline and runtime paths are different pools, and my earlier comment blurred them. To separate them explicitly: - **Runtime:** `VICTORY_PIPELINE_THREADS=1` does reach `pipeline/make.rs::queue`. I ran `main` @⁠940d32f with it, `--console series-x`: 420 s with no exception, then the 900 s cap run died with the same `0xc0000005 at amdxc64.dll+0x861b9f` at 1,710 draws/frame. That is the "delays, does not remove" claim, and it is about the runtime only. - **Offline reproducer:** it uses the CLI's scoped workers sized by `--jobs` (as you say), so `VICTORY_PIPELINE_THREADS` never applied to my bisect signal. The bisect is still valid as a *signal* (good commits reach 100%, bad ones die at ~86%), but I cannot attribute it to the runtime knob. - Your point also suggests a test I have not run: `translate --pipelines --jobs 1` on `940d32f`. If the CLI crash disappears at one worker, then the offline failure is CLI-side concurrency and the runtime story is separate; if it still dies, the driver is choking on some DXIL regardless of concurrency. It is slow (the no-pipeline pass alone takes ~10 minutes here with the default jobs), so I will report it when I have a result rather than guess now. I have edited nothing in the PR, but if the description still says the env "avoids the crash" for the offline reproducer, it should say "runtime only, and it delays rather than avoids" - which matches what I see. AI-assisted: written by DeepSeek (OpenCode harness) from my run logs; the hardware and the dump are mine.
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 09:13 UTC · original

Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head 38e352c1 into main 940d32f in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings: clean; the same with --all-features: clean. cargo test --workspace --locked: 701 passed, 0 failed, 10 ignored, two runs (main alone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-25 09:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7158040048) Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present, so the hardware-only shader checks run. I merged this PR's head `38e352c1` into `main` `940d32f` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean; the same with `--all-features`: clean. `cargo test --workspace --locked`: 701 passed, 0 failed, 10 ignored, two runs (`main` alone on the same machine: 701 passed, 0 failed, 10 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 09:39 UTC · original

Good catch — confirmed in the code: translate sizes its scoped workers by --jobs/available_parallelism, so the env only reached the runtime queue(). Updated the PR so an unset --jobs falls to VICTORY_PIPELINE_THREADS (0 maps to one worker, since translate cannot run with none); that should make VICTORY_PIPELINE_THREADS=1 cover your translate --pipelines reproducer too, while an explicit --jobs 1 still works as before. Also corrected the description — and noted that on the runtime path it serialises compilation rather than promising the crash is gone for good.

**@⁠kotekompotek** on GitHub · 2026-11-25 09:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7158617872) Good catch — confirmed in the code: `translate` sizes its scoped workers by `--jobs`/`available_parallelism`, so the env only reached the runtime `queue()`. Updated the PR so an unset `--jobs` falls to `VICTORY_PIPELINE_THREADS` (`0` maps to one worker, since translate cannot run with none); that should make `VICTORY_PIPELINE_THREADS=1` cover your `translate --pipelines` reproducer too, while an explicit `--jobs 1` still works as before. Also corrected the description — and noted that on the runtime path it serialises compilation rather than promising the crash is gone for good.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 13:30 UTC · original · edited 2026-11-25 14:47 UTC

Automated triage for the maintainers.

Merge candidate (small diagnostic knob). This adds VICTORY_PIPELINE_THREADS. It sets the runtime pipeline worker count (pipeline/make.rs workers/env_workers; 0 makes pipelines on the calling thread, as when no worker can be spawned) and the translate worker count when --jobs is not given (translate.rs thread_count, 0 maps to one). Unset or unparseable values keep today's defaults.

The earlier needs-work points are fixed in ddcb784. The description now says "Refs #2124" instead of closing it. The env_workers doc comment says one worker delays the amdxc64 crash and does not remove it. The README row describes the variable as a diagnostic. CI check passes on this head, and the branch merges cleanly.

Reply to @⁠kotekompotek: thanks, I checked the rewording in the code and the README, and the description no longer closes #2124.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 13:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7163884296) · edited 2026-11-25 14:47 UTC <!-- victory-triage v1 head=ddcb7846c407fb751357ede8da93149aee8fe383 verdict=merge-candidate at=2026-11-25T14:47:03Z --> Automated triage for the maintainers. **Merge candidate (small diagnostic knob).** This adds `VICTORY_PIPELINE_THREADS`. It sets the runtime pipeline worker count (`pipeline/make.rs` `workers`/`env_workers`; `0` makes pipelines on the calling thread, as when no worker can be spawned) and the `translate` worker count when `--jobs` is not given (`translate.rs` `thread_count`, `0` maps to one). Unset or unparseable values keep today's defaults. The earlier needs-work points are fixed in `ddcb784`. The description now says "Refs #2124" instead of closing it. The `env_workers` doc comment says one worker delays the amdxc64 crash and does not remove it. The README row describes the variable as a diagnostic. CI `check` passes on this head, and the branch merges cleanly. Reply to @⁠kotekompotek: thanks, I checked the rewording in the code and the README, and the description no longer closes #2124. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 13:39 UTC · original

Done in ddcb784: "Closes #2124" → "Refs", the doc comment now says the knob delays rather than removes the crash and points at #2124 for the real fix, and the README row describes it as a diagnostic for driver compilers that misbehave under parallel calls.

**@⁠kotekompotek** on GitHub · 2026-11-25 13:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7164090729) Done in `ddcb784`: "Closes #2124" → "Refs", the doc comment now says the knob delays rather than removes the crash and points at #2124 for the real fix, and the README row describes it as a diagnostic for driver compilers that misbehave under parallel calls.
Author
Owner

@⁠0xKaji on GitHub · 2026-11-25 20:23 UTC · original · edited 2026-11-25 20:26 UTC

Additional motivation / A/B measurements for limiting pipeline worker threads (from #2752, closed in favor of this PR):

Tested on Linux + Wine 11.22 + vkd3d-proton + NVIDIA RTX 3060 (8 GB VRAM, 16 GiB system RAM) in Series S mode (with #2112 VICTORY_IN_PLACE=1 + #2723, 4-min run):

Pipeline workers Outcome Time Peak RSS
Default (8) exit=137 ~60 s 11.20 GiB
2 exit=137 ~72 s 10.14 GiB
1 exit=124 (full 4 min) 240 s 8.51 GiB (~4.9 GiB available)

Limiting pipeline compilation to 1 worker avoids the memory/compiler spikes under vkd3d-proton + NVIDIA on 16 GiB systems when entering the world.

**@⁠0xKaji** on GitHub · 2026-11-25 20:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#issuecomment-7173601545) · edited 2026-11-25 20:26 UTC Additional motivation / A/B measurements for limiting pipeline worker threads (from #2752, closed in favor of this PR): Tested on Linux + Wine 11.22 + vkd3d-proton + NVIDIA RTX 3060 (8 GB VRAM, 16 GiB system RAM) in Series S mode (with #2112 `VICTORY_IN_PLACE=1` + #2723, 4-min run): | Pipeline workers | Outcome | Time | Peak RSS | |---|---|---|---| | Default (`8`) | `exit=137` | ~60 s | 11.20 GiB | | `2` | `exit=137` | ~72 s | 10.14 GiB | | `1` | **`exit=124` (full 4 min)** | 240 s | **8.51 GiB** (~4.9 GiB available) | Limiting pipeline compilation to 1 worker avoids the memory/compiler spikes under `vkd3d-proton` + NVIDIA on 16 GiB systems when entering the world.
Author
Owner

@⁠DenRakEiw on GitHub · 2026-11-25 09:02 UTC · original · approved these changes

Verified locally merged onto origin/main (940d32f, Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory-gpu --lib pipeline::make:: — 2 passed, 0 failed
  • cargo clippy -p victory-gpu --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean VICTORY_PIPELINE_THREADS env override for pipeline worker thread count with safe fallback. Looks good.

AI-assisted (Gemini 4 Neon).

**@⁠DenRakEiw** on GitHub · 2026-11-25 09:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#pullrequestreview-6054565942) · **approved these changes** Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory-gpu --lib pipeline::make::` — 2 passed, 0 failed - `cargo clippy -p victory-gpu --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean `VICTORY_PIPELINE_THREADS` env override for pipeline worker thread count with safe fallback. Looks good. AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠catminou4 on GitHub · 2026-11-25 09:35 UTC · original · reviewed

Pipeline workers take their count from VICTORY_PIPELINE_THREADS (0 = caller thread), default half the logical processors clamped 2-8. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Motivated by an AMD RDNA4 amdxc64 driver crash with parallel compiles — a real-world workaround worth documenting in the README too.

**@⁠catminou4** on GitHub · 2026-11-25 09:35 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#pullrequestreview-6055072242) · **reviewed** Pipeline workers take their count from VICTORY_PIPELINE_THREADS (0 = caller thread), default half the logical processors clamped 2-8. Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Motivated by an AMD RDNA4 amdxc64 driver crash with parallel compiles — a real-world workaround worth documenting in the README too.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 16:52 UTC · original · approved these changes

Verified ddcb7846c407fb751357ede8da93149aee8fe383 merged cleanly onto 63bcca43 on Windows 11 (Ryzen 9 9950X, 32 logical threads) with both an RTX 5090 (VICTORY_D3D12_DEBUG=1) and WARP (--features diagnostics, VICTORY_D3D12_DEBUG=1).

Code review

  • env_workers() / workers() (crates/victory-gpu/src/pipeline/make.rs:284-305, re-exported at crates/victory-gpu/src/pipeline.rs:573) cleanly parse VICTORY_PIPELINE_THREADS, warn and fall back to (available_parallelism / 2).clamp(2, 8) on unparseable values, and let 0 fall into the existing synchronous workers == 0 fallback in queue() (make.rs:247-270) with intact p.taken / WAITING / DONE synchronization.
  • thread_count() (apps/victory/src/translate.rs:159-162, wired at lines 195 and 339) preserves --jobs precedence over VICTORY_PIPELINE_THREADS, maps 0 to 1 so offline translation always has at least one worker, and falls back to available_parallelism() otherwise.
  • README.md:190 accurately documents the variable as a diagnostic knob covering both runtime pipeline workers and offline translate when --jobs is unset.

Verification

  • cargo xtask policy: 191 files ok.
  • cargo clippy --locked -p victory-gpu -p victory --all-targets -- -D warnings (default and --all-features): clean.
  • RTX 5090 + VICTORY_D3D12_DEBUG=1: pipeline:: 23 passed, 0 failed; cargo test --locked -p victory -- --test-threads=1 18 passed, 0 failed (including translate_rejects_zero_workers).
  • WARP + --features diagnostics + VICTORY_D3D12_DEBUG=1: pipeline:: 26 passed, 0 failed.
  • Live env runs on pipeline::make:: with VICTORY_PIPELINE_THREADS=0 and VICTORY_PIPELINE_THREADS=1, plus additional unit probes exercising env_workers(), workers(), and thread_count() across unset, 0, 1, 16, empty/whitespace, negative, non-numeric, usize-overflowing strings, and --jobs overrides: all passed.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 16:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/2250#pullrequestreview-6077867639) · **approved these changes** Verified `ddcb7846c407fb751357ede8da93149aee8fe383` merged cleanly onto `63bcca43` on Windows 11 (Ryzen 9 9950X, 32 logical threads) with both an RTX 5090 (`VICTORY_D3D12_DEBUG=1`) and WARP (`--features diagnostics`, `VICTORY_D3D12_DEBUG=1`). ### Code review - `env_workers()` / `workers()` (`crates/victory-gpu/src/pipeline/make.rs:284-305`, re-exported at `crates/victory-gpu/src/pipeline.rs:573`) cleanly parse `VICTORY_PIPELINE_THREADS`, warn and fall back to `(available_parallelism / 2).clamp(2, 8)` on unparseable values, and let `0` fall into the existing synchronous `workers == 0` fallback in `queue()` (`make.rs:247-270`) with intact `p.taken` / `WAITING` / `DONE` synchronization. - `thread_count()` (`apps/victory/src/translate.rs:159-162`, wired at lines `195` and `339`) preserves `--jobs` precedence over `VICTORY_PIPELINE_THREADS`, maps `0` to `1` so offline translation always has at least one worker, and falls back to `available_parallelism()` otherwise. - `README.md:190` accurately documents the variable as a diagnostic knob covering both runtime pipeline workers and offline `translate` when `--jobs` is unset. ### Verification - `cargo xtask policy`: `191 files ok`. - `cargo clippy --locked -p victory-gpu -p victory --all-targets -- -D warnings` (default and `--all-features`): clean. - RTX 5090 + `VICTORY_D3D12_DEBUG=1`: `pipeline::` **23 passed, 0 failed**; `cargo test --locked -p victory -- --test-threads=1` **18 passed, 0 failed** (including `translate_rejects_zero_workers`). - WARP + `--features diagnostics` + `VICTORY_D3D12_DEBUG=1`: `pipeline::` **26 passed, 0 failed**. - Live env runs on `pipeline::make::` with `VICTORY_PIPELINE_THREADS=0` and `VICTORY_PIPELINE_THREADS=1`, plus additional unit probes exercising `env_workers()`, `workers()`, and `thread_count()` across unset, `0`, `1`, `16`, empty/whitespace, negative, non-numeric, `usize`-overflowing strings, and `--jobs` overrides: all passed.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2250/head:github-bot/gh-2250'
git switch 'github-bot/gh-2250'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2250'
git switch 'github-bot/gh-2250'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2250'
git switch 'github-bot/gh-2250'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2250'
git switch 'main'
git merge --squash 'github-bot/gh-2250'
git switch 'main'
git merge --ff-only 'github-bot/gh-2250'
git switch 'main'
git merge 'github-bot/gh-2250'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!2250
No description provided.