fix(victory): preserve VICTORY_HOST_WAVE and VICTORY_VIEW_LIMIT during shader cache warming #298
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!298
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-298"
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?
@mauroalvare on GitHub · 2026-11-26 01:49 UTC · original
mauroalvare:fix/victory-warm-host-overrides→main· +31 −1 · 3 files · 3 commits · openChange
Fixes
victory translate --warmsilently ignoringVICTORY_HOST_WAVEandVICTORY_VIEW_LIMIT(basec4c93bdc413191a9dc909998d2d53080a3f0c880).apps/victory/src/main.rsdocumentsvictory translate --warmas an offline cache warmer ("nothing else is done. SetVICTORY_HOST_WAVEandVICTORY_VIEW_LIMITto what the run's log says of the host") and parses both variables intovictory_shader::emit::set_host_max_wave/set_view_heap_limit. However,shader_cache::warm()callsshader_cache::build(), which unconditionally calleddescriptor::host::probe_view_limit(), which:crate::host::host()), violating offline translation warming.set_host_max_wave(o1.WaveLaneCountMax)insideHost::create(), overwritingVICTORY_HOST_WAVE.set_view_heap_limit(views - 1)insideprobe_view_limit(), overwritingVICTORY_VIEW_LIMIT.As a result, warming a shader cache for another host GPU (e.g. a 64-lane / 2M-view AMD host from an NVIDIA 32-lane / 1M-view PC, or vice versa) clobbered both host facts back to the local adapter and produced 100% cache misses on the target host. In addition,
main.rsreadVICTORY_HOST_WAVEwhiletranslate::runreadVICTORY_HOST_MAX_WAVE, soVICTORY_HOST_MAX_WAVEwas ignored bytranslate --warm.What changed:
victory_shader::emit::host_max_wave().Host::create()(crates/victory-gpu/src/host.rs), sethost_max_wavefromWaveLaneCountMaxonly when it is still unset (0).probe_view_limit()(crates/victory-gpu/src/descriptor/host.rs), return immediately ifview_heap_limit()is already non-zero.shader_cache::build()(crates/victory-gpu/src/shader_cache.rs), probe the local D3D12 adapter only for whichever ofview_heap_limit/host_max_waveis still0— skipping D3D12 device initialization completely when both are supplied.apps/victory/src/main.rs, acceptVICTORY_HOST_WAVEwith fallback toVICTORY_HOST_MAX_WAVE(and trim whitespace on both variables).Normal
victory runandvictory warmstart with both values at0and keep the exact same probing behaviour.Linked issue: N/A
Verification
Host GPU: NVIDIA GeForce RTX 5070 Ti (
WaveLaneCountMax = 32, shader-visible view heap capped at1,000,000-> null slot999,999), Windows x64, Ryzen 7 9700X, 32 GB RAM.Base reproduction (
c4c93bd, before the fix):After the fix:
Oracle and test data
New integration test
third_party/victory/crates/victory-gpu/tests/warm_host_facts.rsuses synthetic bytes (b"synthetic") and a temporary cache directory. It verifies both full-override (host_max_wave=64,view_heap_limit=2_097_151preserved verbatim intranslation_fingerprint()) and partial-override (view_heap_limit=0probed from the RTX 5070 Ti D3D12 device whilehost_max_wave=64stays untouched). Fails on basec4c93bdand passes with this change.Checklist
E_NOTIMPL), never a fake success.test_readme_sync.pychecks it).AGENTS.mdallows (names, slots, argument shapes, flag values, HRESULTs, IIDs, counts), with how they were obtained; no address or RVA.THIRD_PARTY.md.Made with AI assistance (Antigravity).
0105b95125to37fef1b5d837fef1b5d8to613c171da0View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.