Shaders: precompile a bounded recorded startup prefix #3182
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3182"
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 ivall/xcl. Originally posted by bmjask on 2026-11-28T16:32:08Z.
Part of #2088. This adds an opt-in offline command that consumes the ordered manifest and prepares only the compute pipelines first used through a measured present. It resolves the complete prefix before GPU work and refuses prefixes over 500 pipelines, so missing or oversized history cannot silently become a partial or unbounded startup build.
Stacked on #3175 and #3181; only commit
971f857bbelongs here. Supersedes #2104 on currentmain; credit to @RandomGithub12309 for the original implementation.What is in it
shaders/milestone.rs: parse ordered v1 history, select deduplicated compute keys through an exact present, resolve all records first, enforce the 500-pipeline limit, then use the existing translator/pipeline/blob pathshaders.rs: structured CLI parsing and compatibility checks for--pso-manifest FILE --through-present NREADME.md: document the opt-in command and its fail-closed behaviorTested
cargo test -p xcl --lib shaders::milestone::tests -- --test-threads=1: 5 passed, 0 failedcargo build --workspace: passedcargo test --workspace -- --test-threads=4: 2152 passed, 0 failed, 48 ignored; 26 runtime GPU skips (wave64 unavailable, unsupported instruction cases, missingdxil.dll, and heap windows unavailable)Regression run
Main (
db3921dcc69a32be381a17b6a81c944617338c9f):This PR (
971f857bc01115d93ee080ead4f07f8fe898e07b):Not tested
AI use
Codex with GPT-5 adapted #2104 to the current structured CLI, added the 500-pipeline fail-closed bound and test, ran the reported build/tests/smoke, and prepared this PR.