victory: add --jobs worker option to preload #174

Manually merged
github merged 1 commit from gh-pr/174/head into gh-pr/174/base 2026-12-01 20:15:21 +00:00
Owner

@⁠Androtim on GitHub · 2026-11-30 00:05 UTC · original
Androtim:feat/iter171-preload-jobs-flag → main · +15 −4 · 1 files · 1 commits · merged 2026-11-30 01:10 UTC

Summary

Adds --jobs <N> (Option<NonZeroUsize>) to victory preload so users on higher-core CPUs can explicitly control worker parallelism across both shader translation and pipeline warming, matching victory translate --jobs and victory shaders --jobs.

  • Adds #[arg(long)] jobs: Option<NonZeroUsize> to Command::Preload in apps/victory/src/main.rs and forwards jobs.map(NonZeroUsize::get) into translate::precompile, warm::run, and warm::into_library.
  • Preserves existing default parallelism when omitted (all logical cores for shader translation; two-thirds for pipeline warming).
  • Extends SHADER_COMMANDS and parse_shader_jobs in apps/victory/src/main.rs tests to cover preload default (None), positive worker counts, 0, negative values, and overflow.

Addresses #169

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy: asset policy: 311 files ok
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory: pass
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings: pass
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings: pass
**@⁠Androtim** on GitHub · 2026-11-30 00:05 UTC · [original](https://github.com/Androtim/MiniVI/pull/174) `Androtim:feat/iter171-preload-jobs-flag` → `main` · +15 −4 · 1 files · 1 commits · merged 2026-11-30 01:10 UTC ### Summary Adds `--jobs <N>` (`Option<NonZeroUsize>`) to `victory preload` so users on higher-core CPUs can explicitly control worker parallelism across both shader translation and pipeline warming, matching `victory translate --jobs` and `victory shaders --jobs`. - Adds `#[arg(long)] jobs: Option<NonZeroUsize>` to `Command::Preload` in `apps/victory/src/main.rs` and forwards `jobs.map(NonZeroUsize::get)` into `translate::precompile`, `warm::run`, and `warm::into_library`. - Preserves existing default parallelism when omitted (all logical cores for shader translation; two-thirds for pipeline warming). - Extends `SHADER_COMMANDS` and `parse_shader_jobs` in `apps/victory/src/main.rs` tests to cover `preload` default (`None`), positive worker counts, `0`, negative values, and overflow. Addresses #169 ### Verification - `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy`: `asset policy: 311 files ok` - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory`: pass - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings`: pass - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings`: pass
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:15:18 +00:00
github manually merged commit 56400d874c into gh-pr/174/base 2026-12-01 20:15:21 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 01:02 UTC · original

Automated triage for the maintainers (not an approval).

Verdict: merge-candidate · CI (check): passing

Triage Review: PR #174

Verdict: merge-candidate

Summary of Changes

  • Adds --jobs <N> (Option<NonZeroUsize>) to Command::Preload in apps/victory/src/main.rs, matching Command::Translate and Command::Shaders.
  • Forwards jobs.map(NonZeroUsize::get) into translate::precompile, warm::run, and warm::into_library, all of which already accept Option<usize> and preserve existing defaults when None (all logical cores for shader precompilation, cores * 2 / 3 clamped to >= 1 for warm::run and warm::into_library).
  • Extends SHADER_COMMANDS and parse_shader_jobs in apps/victory/src/main.rs under #[cfg(windows)] to test preload (with and without positional paths) across default (None), positive values, 0, negative values, and overflow.

Checks

  • CI: Passing.
  • Scope & edge cases: Minimal, clean CLI plumbing; NonZeroUsize prevents --jobs 0; non-Windows builds remain properly gated via #[cfg(windows)].
  • GPU testing: Not required — no shader translation, GPU rendering, D3D12 host, or launcher default behavior is changed.

(Automated triage review; does not constitute formal maintainer approval.)


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-30 01:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/174#issuecomment-7265794639) <!-- minivi-triage v1 head=56400d874c50de2b28c85ced2b8992546f04bd2a verdict=merge-candidate ci=passing at=2026-11-30T01:03:22Z --> Automated triage for the maintainers (not an approval). **Verdict:** `merge-candidate` · **CI (`check`):** `passing` ### Triage Review: PR #174 **Verdict:** `merge-candidate` #### Summary of Changes - Adds `--jobs <N>` (`Option<NonZeroUsize>`) to `Command::Preload` in `apps/victory/src/main.rs`, matching `Command::Translate` and `Command::Shaders`. - Forwards `jobs.map(NonZeroUsize::get)` into `translate::precompile`, `warm::run`, and `warm::into_library`, all of which already accept `Option<usize>` and preserve existing defaults when `None` (all logical cores for shader precompilation, `cores * 2 / 3` clamped to `>= 1` for `warm::run` and `warm::into_library`). - Extends `SHADER_COMMANDS` and `parse_shader_jobs` in `apps/victory/src/main.rs` under `#[cfg(windows)]` to test `preload` (with and without positional `paths`) across default (`None`), positive values, `0`, negative values, and overflow. #### Checks - **CI:** Passing. - **Scope & edge cases:** Minimal, clean CLI plumbing; `NonZeroUsize` prevents `--jobs 0`; non-Windows builds remain properly gated via `#[cfg(windows)]`. - **GPU testing:** Not required — no shader translation, GPU rendering, D3D12 host, or launcher default behavior is changed. *(Automated triage review; does not constitute formal maintainer approval.)* --- _Generated with Antigravity CLI (`agy`)._
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/Androtim--MiniVI!174
No description provided.