Shaders: track pipeline library compatibility per component #3446

Merged
bmjask merged 2 commits from upstream-pr/3446 into main 2026-11-29 20:19:39 +00:00
bmjask commented 2026-11-29 18:07:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T18:07:30Z.


Splits the prepared pipeline receipt into independent graphics and compute compatibility components so one side can remain reusable when only the other changes.

Stacked on #3445; only commit 119f88d0 belongs here.

What is in it

  • Versioned receipt v2 with separate graphics and compute compatibility identities.
  • Conservative conversion of the existing v1 receipt.
  • Parsing and invalidation tests for both receipt versions.

Tested

  • NVIDIA GeForce RTX 4090, driver 610.88; Intel Core i9-12900K; Windows 11 Pro build 26200; Rust 1.100.0, debug and bench profiles.
  • Focused warm-library tests at this phase: 7 passed, 0 failed.
  • On stacked head db569c7d, .\scripts\test.ps1: 2,748 passed, 0 failed, 49 ignored; 29 GPU tests explicitly skipped for unsupported/opt-in hardware paths.

Regression run

xcl-smoke v1
commit: 0fe06eb0f05459007ebfffc67bb9983acb3a832d
gpu: NVIDIA GeForce RTX 4090
title: 6ca5cab7
seconds: 60
exit: 0x0
frames shown: 1485 (PresentX 1485)
presents per 2 s (last 3): 60 61 60
device removals: 0
crashes: 0
peak commit: 16909 MB
xcl-smoke v1
commit: 119f88d0b6e5a5c540acf92fd69c1f268644288f
gpu: NVIDIA GeForce RTX 4090
title: 6ca5cab7
seconds: 60
exit: 0x0
frames shown: 1561 (PresentX 1561)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14843 MB

Not tested

  • Prepared-corpus activation/AOT behavior in the retail-title smoke: the staged corpus was temporarily absent and XCL_PREPARE=0, so the run exercised the runtime/JIT path only.
  • AMD, wave64, heap-window opt-in, GPU_UPLOAD heaps, or dxil.dll paths.

AI use

  • Codex with GPT-5 implemented and tested the change. The final diff and reported commands were reviewed from this worktree.
<!-- greyfinch-sync:ivall/xcl:issue:5553574471 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3446). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-29T18:07:30Z. --- Splits the prepared pipeline receipt into independent graphics and compute compatibility components so one side can remain reusable when only the other changes. Stacked on #3445; only commit `119f88d0` belongs here. **What is in it** - Versioned receipt v2 with separate graphics and compute compatibility identities. - Conservative conversion of the existing v1 receipt. - Parsing and invalidation tests for both receipt versions. **Tested** - NVIDIA GeForce RTX 4090, driver 610.88; Intel Core i9-12900K; Windows 11 Pro build 26200; Rust 1.100.0, debug and bench profiles. - Focused warm-library tests at this phase: 7 passed, 0 failed. - On stacked head `db569c7d`, `.\scripts\test.ps1`: 2,748 passed, 0 failed, 49 ignored; 29 GPU tests explicitly skipped for unsupported/opt-in hardware paths. **Regression run** ``` xcl-smoke v1 commit: 0fe06eb0f05459007ebfffc67bb9983acb3a832d gpu: NVIDIA GeForce RTX 4090 title: 6ca5cab7 seconds: 60 exit: 0x0 frames shown: 1485 (PresentX 1485) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 16909 MB ``` ``` xcl-smoke v1 commit: 119f88d0b6e5a5c540acf92fd69c1f268644288f gpu: NVIDIA GeForce RTX 4090 title: 6ca5cab7 seconds: 60 exit: 0x0 frames shown: 1561 (PresentX 1561) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14843 MB ``` **Not tested** - Prepared-corpus activation/AOT behavior in the retail-title smoke: the staged corpus was temporarily absent and `XCL_PREPARE=0`, so the run exercised the runtime/JIT path only. - AMD, wave64, heap-window opt-in, GPU_UPLOAD heaps, or `dxil.dll` paths. **AI use** - Codex with GPT-5 implemented and tested the change. The final diff and reported commands were reviewed from this worktree.
Foniass commented 2026-11-29 21:01:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T21:01:48Z.


Post-merge review of 119f88d0 (now on main). The suite passes on this head merged onto 0fe06eb0: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2741 passed, 0 failed, 49 ignored, 31 SKIPPED. Three points from reading the code:

  1. Per-component reuse is not done anywhere in the stack. The description says one side "can remain reusable when only the other changes". However, publish (warm_library.rs:245) always writes the same compatibility to both components. reuse_inner (warm_library.rs:223) also rejects the whole set when either component differs, and preparation then rebuilds both. As merged, receipt v2 is a format change with no behaviour change. The benefit needs a follow-up that publishes and reuses each component separately.
  2. A failed write of the migrated v1 receipt makes reuse fail. In a read-only folder, for example, the whole corpus is then prepared again instead of the valid libraries being used.
  3. The v1 receipt stays on disk after migration. This is harmless, but it is never cleaned up.

RTX 5070 Ti (driver 32.0.16.2114), Ryzen 7 7800X3D, Windows 11 Pro 26300, Rust 1.100.0 debug. This review was written by Claude Code (Claude Opus 5.5) and checked by @Foniass.

<!-- greyfinch-sync:ivall/xcl:comment:7262546024 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3446#issuecomment-7262546024). Originally posted by [Foniass](https://github.com/Foniass) on 2026-11-29T21:01:48Z. --- Post-merge review of `119f88d0` (now on `main`). The suite passes on this head merged onto `0fe06eb0`: `cargo test --workspace --no-fail-fast -- --test-threads=4` -> 2741 passed, 0 failed, 49 ignored, 31 SKIPPED. Three points from reading the code: 1. **Per-component reuse is not done anywhere in the stack.** The description says one side "can remain reusable when only the other changes". However, `publish` (`warm_library.rs:245`) always writes the same compatibility to both components. `reuse_inner` (`warm_library.rs:223`) also rejects the whole set when either component differs, and preparation then rebuilds both. As merged, receipt v2 is a format change with no behaviour change. The benefit needs a follow-up that publishes and reuses each component separately. 2. **A failed write of the migrated v1 receipt makes reuse fail.** In a read-only folder, for example, the whole corpus is then prepared again instead of the valid libraries being used. 3. **The v1 receipt stays on disk after migration.** This is harmless, but it is never cleaned up. RTX 5070 Ti (driver 32.0.16.2114), Ryzen 7 7800X3D, Windows 11 Pro 26300, Rust 1.100.0 debug. This review was written by Claude Code (Claude Opus 5.5) and checked by @Foniass.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!3446
No description provided.