Use runtime shader settings when warming the disk cache #6

Open
github-bot wants to merge 1 commit from github-bot/gh-6 into main AGit
Owner

@⁠timorjay on GitHub · 2026-11-26 02:28 UTC · original
timorjay:warm-listed-shaders → main · +1 −1 · 1 files · 1 commits · open

Offline warm-up and live cache misses use the same cache key. A live miss selects the shader-specific wave settings in translate_listed, while warm called the generic translator directly. A cache previously filled by victory translate --warm could therefore change the shader used at first use.

This routes a warm-up miss through the same helper as a live miss. The cache already fingerprints this source file, so existing entries get a new key.

On bd552a5 I compared the full HostShader (DXIL bytes and metadata) from a live miss with the result of warming a fresh cache and then calling the live path. With a 32-lane host configuration, VICTORY_SHADER_OPT=0, and the default per-shader lists, three of eight local inputs differed before the change. The inputs below are identified by the hashes already listed in the source.

Shader Live miss, bytes Live read after unpatched warm-up, bytes
369cbe906ea72764 15,068 28,072
5dc3b25986622949 103,976 201,344
6f225b641c5b0708 160,356 325,112

After the change all eight comparisons matched byte for byte, and a second warm-up read each entry from disk. The four existing shader_cache::tests passed. The PR contains one production-line change. The comparison measures cache correctness. The test inputs stayed local.

Tested with Codex assistance.

**@⁠timorjay** on GitHub · 2026-11-26 02:28 UTC · [original](https://github.com/realblastex/flamingo/pull/6) `timorjay:warm-listed-shaders` → `main` · +1 −1 · 1 files · 1 commits · open Offline warm-up and live cache misses use the same cache key. A live miss selects the shader-specific wave settings in `translate_listed`, while `warm` called the generic translator directly. A cache previously filled by `victory translate --warm` could therefore change the shader used at first use. This routes a warm-up miss through the same helper as a live miss. The cache already fingerprints this source file, so existing entries get a new key. On `bd552a5` I compared the full `HostShader` (DXIL bytes and metadata) from a live miss with the result of warming a fresh cache and then calling the live path. With a 32-lane host configuration, `VICTORY_SHADER_OPT=0`, and the default per-shader lists, three of eight local inputs differed before the change. The inputs below are identified by the hashes already listed in the source. | Shader | Live miss, bytes | Live read after unpatched warm-up, bytes | | --- | ---: | ---: | | `369cbe906ea72764` | 15,068 | 28,072 | | `5dc3b25986622949` | 103,976 | 201,344 | | `6f225b641c5b0708` | 160,356 | 325,112 | After the change all eight comparisons matched byte for byte, and a second warm-up read each entry from disk. The four existing `shader_cache::tests` passed. The PR contains one production-line change. The comparison measures cache correctness. The test inputs stayed local. Tested with Codex assistance.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:00:30 +00:00
Author
Owner

@⁠realblastex on GitHub · 2026-11-26 05:21 UTC · original · edited 2026-11-26 05:22 UTC

Thank you @⁠timorjay, that's a great catch, and the byte-for-byte comparison makes it easy to trust. I'd been warming the cache with translate --warm before test runs, so those runs used the generic translation for exactly the listed shaders. The fix is in my dev branch; this PR gets merged from the GitHub side.

**@⁠realblastex** on GitHub · 2026-11-26 05:21 UTC · [original](https://github.com/realblastex/flamingo/pull/6#issuecomment-7183414062) · edited 2026-11-26 05:22 UTC Thank you @⁠timorjay, that's a great catch, and the byte-for-byte comparison makes it easy to trust. I'd been warming the cache with `translate --warm` before test runs, so those runs used the generic translation for exactly the listed shaders. The fix is in my dev branch; this PR gets merged from the GitHub side.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/6/head:github-bot/gh-6'
git switch 'github-bot/gh-6'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-6'
git switch 'github-bot/gh-6'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-6'
git switch 'github-bot/gh-6'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-6'
git switch 'main'
git merge --squash 'github-bot/gh-6'
git switch 'main'
git merge --ff-only 'github-bot/gh-6'
git switch 'main'
git merge 'github-bot/gh-6'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.