CLI: schedule each pipeline key once per prebuild #3568

Open
github-bot wants to merge 1 commit from github-bot/gh-3568 into main AGit
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 18:22 UTC · original
andrewpozdnakov7-jpg:codex2/prebuild-distinct-jobs → main · +16 −6 · 1 files · 1 commits · open

Two records in a shader pack can resolve to the same pipeline key. The prebuild used to send each record to a worker. On a cold cache, the first worker creates the pipeline and the others can repeat the work of loading it from the host library.

Schedule one job per key and report how many records share a key. Pipelines from the early list still go first. The diagnostic key listing keeps one row per pack record.

I compared main 63bcca4 with this patch through victory translate --cache --pipelines --jobs 4 on Windows with Agility and WARP. The generated pack has 17 compute records and two distinct keys.

Run main Patch
Cold 2 created, 15 library loads 2 created, 0 library loads
Warm 17 records counted as already present 2 keys already present, 15 duplicate records

Both runs saved the same two prebuilt keys. VICTORY_PREBUILD_KEYS produced the same 17 records before and after the change. This fixture measures work counts. A title-sized timing comparison remains open.

All 18 application tests passed in both feature configurations. Strict Clippy and the asset policy passed. #2787 changes the same scheduling block, so combining the two patches requires a merge there.

Coordination claim

AI-assisted with Codex. Please retain the Git author if reapplying this change. If folding it into another commit, please add Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 18:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/3568) `andrewpozdnakov7-jpg:codex2/prebuild-distinct-jobs` → `main` · +16 −6 · 1 files · 1 commits · open Two records in a shader pack can resolve to the same pipeline key. The prebuild used to send each record to a worker. On a cold cache, the first worker creates the pipeline and the others can repeat the work of loading it from the host library. Schedule one job per key and report how many records share a key. Pipelines from the early list still go first. The diagnostic key listing keeps one row per pack record. I compared `main` `63bcca4` with this patch through `victory translate --cache --pipelines --jobs 4` on Windows with Agility and WARP. The generated pack has 17 compute records and two distinct keys. | Run | `main` | Patch | | --- | --- | --- | | Cold | 2 created, 15 library loads | 2 created, 0 library loads | | Warm | 17 records counted as already present | 2 keys already present, 15 duplicate records | Both runs saved the same two prebuilt keys. `VICTORY_PREBUILD_KEYS` produced the same 17 records before and after the change. This fixture measures work counts. A title-sized timing comparison remains open. All 18 application tests passed in both feature configurations. Strict Clippy and the asset policy passed. #2787 changes the same scheduling block, so combining the two patches requires a merge there. [Coordination claim](https://git.gtahub.st/github/Marvisak--VIctory/issues/1633) AI-assisted with Codex. Please retain the Git author if reapplying this change. If folding it into another commit, please add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 18:27:05 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 18:25 UTC · original

Windows CI passed on 3a8c8ab.

With 17 synthetic records for two keys, the cold run still made both pipelines and avoided the 15 redundant library loads. The warm run found both saved keys. All 17 diagnostic rows match the control. A one-worker run also confirmed that a key seeded in the early list is made first.

Next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the change into another commit.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 18:25 UTC · [original](https://github.com/Marvisak/VIctory/pull/3568#issuecomment-7225466373) [Windows CI](https://github.com/Marvisak/VIctory/actions/runs/46048933530/job/140675112618) passed on `3a8c8ab`. With 17 synthetic records for two keys, the cold run still made both pipelines and avoided the 15 redundant library loads. The warm run found both saved keys. All 17 diagnostic rows match the control. A one-worker run also confirmed that a key seeded in the early list is made first. Next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the change into another commit.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-27 18:47 UTC · original

Verified the dedup mechanism on this Wine/RTX 4060 Laptop using production #3568 head 3a8c8ab9b8 plus the previously verified #1722 null-blob empty-library bootstrap. This is a dirty local integration, not an exact-head pass; the only added production behavior is that Wine prerequisite. Local CLI fixture and test-only dev-dependency/lockfile changes are retained.

One bounded CLI integration test passed (0 ignored, 6.84 s, fresh intended-tree build 8.61 s). The synthetic input has 17 records representing two distinct pipeline keys, with different identifying instruction prefixes and thread-group metadata to avoid conflating this with #3521's primary-container fix.

Observed/asserted:

  • Diagnostic mode retains all 17 per-record rows with exact identities.
  • One-worker cold run creates exactly two native PSOs, zero duplicate library loads; the key in early-pipelines.txt is built first.
  • Fresh warm CLI process reports both keys already present, schedules no pipeline build records, and preserves the exact persisted key set.
  • Four-worker cold run also creates exactly two PSOs, zero duplicate loads, and persists those two keys.
  • Real physical NVIDIA device required through the D3D12 device's adapter LUID/vendor/software flags; native DXVK logs also identify RTX 4060 Laptop.

This verifies actual CLI scheduling/library creation/persistence, not shader dispatch, a retail-size corpus, matched-parent timing, measured loading RAM/stutter improvement, or gameplay. Initial attempts failed on my added fixture's lockfile entries, missing identifying v_nop prefixes, and an adapter-log assertion that incorrectly assumed Wine native logs are captured in the Windows child's stderr. Those harness issues were corrected; they are not PR failures.

Linux 6.17, Wine 11, NVIDIA 590.48.1, 16 GiB RAM/8 GiB VRAM; diagnostic-relaxed-vtable vkd3d 2576c0b4adfae4a+, not stock certification. Vendor unmasked; all existing guards retained. Sampled GPU peak290 MiB, available RAM minimum11143.4 MiB, disk minimum11.493 GiB. Evidence .compat-runtime/logs/verify-victory3568-prebuild-dedup-native-20261127T184605Z/.

Next meaningful performance comparison is a matched real-corpus cold/warm workload on a runtime-cleared rendering stack, without treating already-present counters as shader execution.

**@⁠pickles976** on GitHub · 2026-11-27 18:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/3568#issuecomment-7225880642) Verified the dedup mechanism on this Wine/RTX 4060 Laptop using production #3568 head 3a8c8ab9b853fae82f256c0ebb475ce6393d28d7 **plus the previously verified #1722 null-blob empty-library bootstrap**. This is a dirty local integration, not an exact-head pass; the only added production behavior is that Wine prerequisite. Local CLI fixture and test-only dev-dependency/lockfile changes are retained. One bounded CLI integration test passed (0 ignored, 6.84 s, fresh intended-tree build 8.61 s). The synthetic input has 17 records representing two distinct pipeline keys, with different identifying instruction prefixes and thread-group metadata to avoid conflating this with #3521's primary-container fix. Observed/asserted: - Diagnostic mode retains all 17 per-record rows with exact identities. - One-worker cold run creates exactly two native PSOs, zero duplicate library loads; the key in early-pipelines.txt is built first. - Fresh warm CLI process reports both keys already present, schedules no pipeline build records, and preserves the exact persisted key set. - Four-worker cold run also creates exactly two PSOs, zero duplicate loads, and persists those two keys. - Real physical NVIDIA device required through the D3D12 device's adapter LUID/vendor/software flags; native DXVK logs also identify RTX 4060 Laptop. This verifies actual CLI scheduling/library creation/persistence, not shader dispatch, a retail-size corpus, matched-parent timing, measured loading RAM/stutter improvement, or gameplay. Initial attempts failed on my added fixture's lockfile entries, missing identifying v_nop prefixes, and an adapter-log assertion that incorrectly assumed Wine native logs are captured in the Windows child's stderr. Those harness issues were corrected; they are not PR failures. Linux 6.17, Wine 11, NVIDIA 590.48.1, 16 GiB RAM/8 GiB VRAM; diagnostic-relaxed-vtable vkd3d 2576c0b4adfae4a+, not stock certification. Vendor unmasked; all existing guards retained. Sampled GPU peak290 MiB, available RAM minimum11143.4 MiB, disk minimum11.493 GiB. Evidence `.compat-runtime/logs/verify-victory3568-prebuild-dedup-native-20261127T184605Z/`. Next meaningful performance comparison is a matched real-corpus cold/warm workload on a runtime-cleared rendering stack, without treating already-present counters as shader execution.
This pull request can be merged automatically.
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/3568/head:github-bot/gh-3568'
git switch 'github-bot/gh-3568'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3568'
git switch 'github-bot/gh-3568'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3568'
git switch 'github-bot/gh-3568'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3568'
git switch 'main'
git merge --squash 'github-bot/gh-3568'
git switch 'main'
git merge --ff-only 'github-bot/gh-3568'
git switch 'main'
git merge 'github-bot/gh-3568'
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!3568
No description provided.