GPU: retry publishing prebuilt pipeline lists after a write failure #2232
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2232
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2232/head"
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?
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 08:27 UTC · original
andrewpozdnakov7-jpg:codex2/pso-prebuilt-retry→main· +53 −4 · 1 files · 2 commits · closed without mergingThe save clears the prebuilt list's dirty flag when it serializes the library. If publication then fails, the next save can skip the list even after the destination is available. This can leave the prebuild without a matching list of pipelines already built.
Mark an unpublished prebuilt list dirty again on the write error so the next save retries. The regression blocks the list's path with a directory, saves a native D3D12 library, removes the obstruction, and saves again. Before the fix the list was missing after the retry. With the fix it contains the recorded key and its tag matches the library on disk.
Coordination claim in #1633.
AI-assisted using Codex. Synthetic data only.
@Dathinel on GitHub · 2026-11-25 08:44 UTC · original · edited 2026-11-25 09:09 UTC
Integration note for #1429: the two heads conflict in pipeline/library.rs, and they preserve different retry behavior. On Windows with a native D3D12 library, the prebuilt-list regression on
84b873cpassed. I then blocked early-pipelines.txt with a directory, saved one used key, removed the directory, and saved again without adding another key.84b873cwith an empty prebuilt set, the second save left early-pipelines.txt absent. Marking the used list dirty again wrote the expected key, confirming the path was writable.88ecb4cwith an empty prebuilt set, the second save wrote the key as expected.If the changes are integrated, keeping both regressions would cover the two files independently. The early-list case is outside this PR's stated prebuilt-list fix. AI-assisted, synthetic data only.
Follow-up on combined commit 5138eff: I blocked the early-list destination on save 1, unblocked it, recorded a second synthetic key, and blocked the prebuilt-list destination on save 2. After unblocking both, save 3 recovered both keys in each list without any further updates. The prebuilt tag matched the serialized library on disk, and both dirty flags cleared. All 12 selected pipeline-library tests, including this case, passed on the default Windows D3D12 device and again on WARP. This exercises sequential retry and publication with synthetic keys and an empty native library.
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 09:05 UTC · original
Thanks for confirming the repro and pointing out #1429. I tried the same Windows/WARP tests on its current head (
88ecb4c) and on5138eff, which layers the prebuilt retry on top.prebuilt-pipelines.txtleaves it missing on the next save on88ecb4c. The combined commit writes it on retry and verifies its tag against the serialized library.early-pipelines.txtwith a prebuilt update pending makes the next save restore the early list on88ecb4c, but still drops the prebuilt list. The combined commit restores both files on retry.The
victory-gpudiagnostics suite went from 146 passed, 3 failed, 2 ignored to 148 passed, 1 failed, 2 ignored. The placed-view texture-format test fails in both runs. Clippy with diagnostics and all targets is clean.The combined commit can be cherry-picked onto #1429 if that lands first. If you fold in the prebuilt retry, please retain
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>.@Marvisak on GitHub · 2026-11-25 13:30 UTC · original
Automated triage for the maintainers.
On a failed write,
pipeline::library::save(crates/victory-gpu/src/pipeline/library.rs) now setsprebuilt_changedagain, so the next save retries the prebuilt list instead of skipping it. On main the flag is already cleared when the library is serialized. The change is small, and the regression test blocks the destination with a directory and then checks that the list's tag matches the library on disk. CI passes. One thing to know: it conflicts with #1429, which fixes the separate early-list retry in the same function. One will need rebasing after the other lands, and a tester has posted a combined commit (5138eff) above.Generated by Claude Code
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 22:03 UTC · original
I resolved the conflict in 728d376. The merged code uses the upstream ordered early-list loader, fallible serialization allocation and separate pipeline-load handle.
On merged main
5c7489f, the same WARP fixture leaves the prebuilt list missing at the second save when its retry is disabled. With the patch the second save writes the list with the matching library tag. Both saves retain the expected order in the early list. The app-local WARP GPU suite passed 242 tests with one ignored, including the upstream parallel load and oldest-keys tests. Both strict Clippy configurations and staged asset policy pass. Clean merge-tree withf3578e3.Please retain the Git author if moving the original change, or keep this trailer if it is folded into another commit.
Co-authored-by: andrewpozdnakov7-jpg [email protected]
AI-assisted with Codex.
@Marvisak on GitHub · 2026-11-25 22:06 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing in favour of #2327, which gives back every dirty mark on a failed serialise or write. This restores only
prebuilt_changed, and only on a write failure, so a failed library write with nothing else dirty is still not retried.If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed