GPU: allow configuring pipeline worker count via VICTORY_PIPELINE_WORKERS #2752
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2752
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2752/head"
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?
@0xKaji on GitHub · 2026-11-25 19:40 UTC · original
0xKaji:feat/pipeline-workers→main· +26 −3 · 1 files · 1 commits · closed without mergingAdds 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.@kotekompotek on GitHub · 2026-11-25 20:03 UTC · original
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.
@fuzeofficlal on GitHub · 2026-11-25 20:14 UTC · original
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.@0xKaji on GitHub · 2026-11-25 20:23 UTC · original
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