GPU: allow configuring pipeline worker count via VICTORY_PIPELINE_WORKERS #2750
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2752"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by 0xKaji on 2026-11-25T19:40:15Z.
Adds an optional
VICTORY_PIPELINE_WORKERSenvironment variable (clamped to1..=16) to override the default pipeline worker thread count ((cpus / 2).clamp(2, 8)) incrates/victory-gpu/src/pipeline/make.rs.Motivation
exit=137) on 16 GiB RAM systems under Linux + Wine + vkd3d-proton when entering the world.A/B Measurements (Linux / Wine 11.22 / vkd3d-proton / RTX 3060 8 GB / 16 GiB RAM, Series S + #2112 + #2723, 4-min run)
VICTORY_PIPELINE_WORKERS8)exit=1372exit=1371exit=124(full 4 min)Verification
worker_count_respects_override_and_clamps.cargo xwin check --workspace --target x86_64-pc-windows-msvc --lockedandcargo xwin test -p victory-gpu --no-run --target x86_64-pc-windows-msvc --locked.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T20:03:02Z.
Heads up: this overlaps #2250 (VICTORY_PIPELINE_THREADS), which the maintainer triage already marked merge-candidate. Differences: #2250 also applies the knob to worker count when --jobs isn't given, and its 0 value selects calling-thread compilation (the strongest workaround for the amdxc64 crash in #2124) - your 1..=16 clamp silently maps 0 to 1, losing that diagnostic. The A/B data here (peak RSS vs workers, exit=137 on 16 GiB under vkd3d) is genuinely useful extra motivation either PR could cite. Whichever lands, it may be worth keeping the 0=synchronous semantics.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T20:14:29Z.
Reviewed and verified
ab8d3768on Windows 11 againstmain(13f91ca).Code review & overlap note
worker_countpreserves the default(cpus / 2).clamp(2, 8)when unset or unparseable and clamps parsed overrides into1..=16(avoiding thread-count explosion on huge inputs like"100000"). Minor note: invalid or out-of-range values are clamped/ignored silently without atracing::warn!.#2250(alreadytriage: merge candidate,VICTORY_PIPELINE_THREADS): both configurepipeline::make::queueworker threads, with a behavioral difference on0(#2250uses0for synchronous/calling-thread compilation, whereas#2752clamps0to1). Worth coordinating env-var naming and0semantics with#2250.Verification (Windows 11,
rustc 1.98.1MSVC)VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --lib --locked -- pipeline::: 17 passed, 0 failed (includingworker_count_respects_override_and_clamps).cargo clippy -p victory-gpu --all-targets --locked -- -D warnings: 0 warnings;cargo xtask policy: 184 files ok; cleangit merge-treeagainst13f91caand#2746.Imported from Marvisak/VIctory. Originally posted by 0xKaji on 2026-11-25T20:23:32Z.
Thanks @kotekompotek and @fuzeofficlal for the review and the heads-up! Closing this PR in favor of #2250 (
VICTORY_PIPELINE_THREADS), and I've posted the 16 GiB / NVIDIA A/B measurements there.Pull request closed