GPU: allow pipeline worker count and priority overrides #3527
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3527"
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 tharun-37 on 2026-11-27T14:22:59Z.
Adds two opt-in environment knobs to the background host pipeline workers:
VICTORY_PSO_WORKERS(1..=64) — worker count.VICTORY_PSO_PRIORITY(belowornormal) — worker thread priority.Both are read once when the workers start. Invalid values fall back to the defaults: half the logical processors clamped to
2..=8, andbelowpriority. Existing runs are unchanged unless a knob is set.Why: world-entry warm-up can be dominated by background pipeline compilation. A run can now A/B worker capacity and scheduling priority without rebuilding. This change only exposes the controls; changing the defaults is left to a measured follow-up.
Verification:
cargo clippy --workspace --all-targets --locked -- -D warningspasses.cargo test --workspace --locked: 230 passed on this branch versus 228 on base, with the same 3 pre-existing failures.AI-assisted (OpenCode).
Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-27T14:47:48Z.
Independent CPU/WARP verification (no physical GPU, no game, no game data). AI use: Claude Code (Claude Sonnet 5.5).
Environment: AMD Ryzen 7 5700X3D 8C/16T, Windows 11 25H2 build 10.0.26200, rustc 1.98.1 (48a229cea 2026-09-01), system WARP (
d3d10warp.dll) 10.0.26100.9818,-j 4, one shared target dir. Run withVICTORY_WARP=1,VICTORY_D3D12_WARP=1,VICTORY_DXILset to the Windows SDK 10.0.26100dxil.dll. (I could not findVICTORY_WARPin the source, onlyVICTORY_D3D12_WARPis documented; I set both.)SHAs: head
cdfb6587bd2f342433080ad77e7759708434fbf6(unchanged when I started and when I posted), merge base63bcca43c6a00a758510398fa43096ce7e4f7df0(current main tip).cargo test -p victory-gpu --lib --lockedpipeline::make::cargo clippy -p victory-gpu --all-targets --locked -- -D warningsNo regressions. The PR has no other comments, so nothing to duplicate. Lib tests do not start the pipeline workers, so the env paths are covered by the parsing unit tests and the read below, not by a live run.
Diff read:
worker_count(None, n)is(n/2).clamp(2,8), as before, and theavailable_parallelismerror case still gives 2. Priority defaults toTHREAD_PRIORITY_BELOW_NORMAL, the same call as before. Invalid or out-of-range worker values ("",abc,0,65) fall back to that default, as the body says, and" 3 "is trimmed. The only added behaviour on the default path is onetracing::info!line (make.rs:~308).VICTORY_PSO_PRIORITYis matched case-sensitively (worker_priority,make.rs:285-290), soNORMALorNormalsilently falls back tobelow. The body only saysbelowornormal; a note, oreq_ignore_ascii_case, would avoid a confusing A/B run.make.rs:342) rather than once next to the count (:307). Same result unless the environment changes mid-run.BelowtoTHREAD_PRIORITY_BELOW_NORMALandNormaltoTHREAD_PRIORITY_NORMAL, applied withSetThreadPriorityon the worker's own thread, which is correct.Imported from Marvisak/VIctory. Originally posted by futurepro62 on 2026-11-27T19:52:07Z.
NVIDIA full-suite run, to go with the reports above by oni-swr, since none of them names a GPU run. Tested exact head
cdfb658(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 868 passed, 0 failed, 10 ignored.worker_count_parsing_keeps_the_default_bounds,worker_priority_defaults_to_below_normal.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-28T02:47:40Z.
Addressed the minor review findings in \
cd76fca: \VICTORY_PSO_PRIORITY\ is now case-insensitive, invalid worker/priority values warn with their fallback, and the priority is read once and passed to each worker instead of being re-read there. The worker tests and strict Clippy pass.AI-assisted (OpenCode).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.