Cache refused programs and failed compiles — boot pays for the same refusals every run; markers must be capability-keyed #1412
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#1412
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@pickles976 on GitHub · 2026-11-24 15:42 UTC · original
The problem: refusals are permanent customers of boot time
Marvisak/VIctory#1089 filed this for their translator; we have the gap twice, in two different layers:
compile_cached_in_with(dxc.rs:768) writes only on success; a deterministically failing compile (unsupported construct reaching DXIL, poisoned diagnostic) re-pays the full DXC invocation every run. The counters even count it (counters.failure), soreport.jsonshows the same failures every boot — nobody is saving the answer.… is not supportederrors (64-bit image atomic, untracked-mask select — the classes populating #675 logs) are emitted upstream ofcompile_cached_in_with, so a refused program is re-lowered from scratch every launch forever. On story-load titles the refusal set is stable run-to-run, which means a stable, pointless multi-second slice of every cold boot — and it scales with the corpus, i.e. worst exactly on the mesh-heavy runs (#675) where boot time is already the user complaint.Constraint: negative entries are capability-scoped, not content-scoped
A refusal is only as durable as the capability set that produced it — our own BCPack merge flipped 512 refusals into successes (first field confirmation #1337: 512 → 0). A naive content-keyed marker file would then poison the cache against the fix. Requirements for any implementation:
XCL_DEBUG_PS_SUB, wave knobs) — a debugging session must never write or read them.Acceptance: two consecutive runs with an unchanged corpus re-run zero DXC invocations and zero re-lowerings for previously refused programs (counters prove it: second-run
compilationsand refusal counts flat), and adding one instruction to the spec (or removing it) invalidates exactly the affected markers, per the digest.@KarolKurzyna on GitHub · 2026-11-24 16:27 UTC · original
I'll take this on a clean branch off
main.Plan:
crates/xcl/src/gpu/recomp/dxc.rsand for translator refusals upstream of DXC incrates/xcl/src/gpu/recomp/pso.rs, keyed on the content/translation inputs plus translator revision and capability-affecting config (wave mode, GVN/extra flags), storing the exact refusal reason text so log and counter reporting stay identical on subsequent runs.XCL_DEBUG_*,XCL_SAFE_BARRIER, forced wave knobs), deleting any stale or mismatched markers cleanly.@pickles976 on GitHub · 2026-11-24 16:31 UTC · original
Go ahead — plan matches the acceptance. Two traps to save a round-trip, both from the #1147/#1086 evidence trail this issue came out of: ① capability inputs must include the lowering-affecting env knobs —
XCL_SPLIT_WAVE64, wave options,XCL_DEBUG_PS_SUB: a marker written under a debug override must never be read (or written) in a clean run; the cheap invariant is override present ⇒ markers off entirely, not "override folded into the key" (the key space silently explodes and every debug session forks the cache). ② a marker hit must reproduce the identical refusal log line the live translation emits today (same reason string, same call site) — half this issue's value is cohort triage from log tails, and a marker that logs differently makes run-2 reports incomparable with run-1 corpus. Third, smaller: on digest-drift invalidation, delete stale markers rather than ignore them, orrefusalscounts stay flat forever after the translator changes and the counters stop being honest.@KarolKurzyna on GitHub · 2026-11-24 16:38 UTC · original
Opened #1472 implementing capability-keyed negative cache markers for both deterministic DXC failures (
XCLFAIL1<key>.failindxc.rs) and upstream translator refusals (XCLTRNF1<stem>.failinpso.rs), skipping/deleting markers under capability-changing and debug env overrides and preservingcompilation_errors/ counter reporting. Verified on RTX 3070 Ti with.\scripts\test.ps1(776 passed, 0 failed, 41 ignored) and a 60 sxcl-smokerun (1656frames shown,0device removals / crashes).