Repository navigation
tooling: replay revision 28 compute request archives - #3731
Conversation
Refs R0Y00#2182 gfx2hlsl.compute_key now takes an explicit revision. load_compute_request checks the current 29cs key and then the archived 28cs key, like read_compute_request in src/shader_compute_request.cpp, and keeps the same "compute request files do not match the key in their name" refusal when both miss. The graphics path and the other revisions are unchanged. The regression builds Case A with a revision-28 key, checks the key against the runtime length-framed chain, translates it manifest-only, and checks that a revision-28 request altered after naming is refused. Commands and results: - python -B tests/startup_compute_translate_check.py exit 0: revision-28 replay and altered revision-28 refusal; 5 malformed requests refused; renamed/incomplete requests refused; done tests pass. - python -B tests/startup_shader_cache_revision_check.py exit 0: PASS. - python -B tests/startup_shader_cache_rekey_check.py exit 0: all checks passed. - python -B tests/startup_shader_cache_rekey_cli_check.py exit 0: 4 tests OK. - python -B tests/startup_compute_request_offline_check.py exit 0: key vector, pending/refusals checks pass. - python -B tests/startup_tools_lint_check.py tools/startup exit 0: PASS, 26 files parse. - ctest --preset dev --no-tests=error -R '^startup_compute_translate_requests$' not run: the new worktree has no out/build/dev; no full build was started.
Leyukaka
left a comment
There was a problem hiding this comment.
Reviewed d0e8f9285 by reading the diff. The fallback in tools/startup/gfx2hlsl.py:13210 matches the C++ request reader. The synthetic fixture at tests/startup_compute_translate_check.py:65 checks that revision 28 produces HLSL and a compute manifest, and that changing a companion's bytes without changing its size is still refused. I found nothing to change. I have not run the tests myself, so this relies on the required checks.
One possible follow-up, not for this PR: tools/startup/shader_cache_revision.py:91 could distinguish a live cache revision mismatch from replay support. A cache stamped with compute revision 28 still produces the blanket key-mismatch warning even though the translator can replay its compute requests.
The offline compute translator refuses revision-28 archives with
compute request files do not match the key in their name, whileread_compute_requeststill accepts the revision-28 hash after the currentone. A census of the 1 December cache found that all 600 compute key-mismatch
lines are valid revision-28 requests, so the refusal hides replayable
archives.
compute_keynow takes an explicitrevision(the current revision bydefault), and
load_compute_requesttriesx2w-startup-shader-29csandx2w-startup-shader-28csbefore refusing, matching the runtime reader. Thegraphics path and all other revisions are unchanged. The regression builds a
source-built revision-28 request, translates it in manifest-only mode, and
checks that an altered revision-28 request is still refused with the same
reason.
Validation:
python -B tests/startup_compute_translate_check.py(pass)python -B tests/startup_shader_cache_revision_check.py(pass)python -B tests/startup_shader_cache_rekey_check.py(pass)python -B tests/startup_shader_cache_rekey_cli_check.py(4 tests, pass)python -B tests/startup_compute_request_offline_check.py(pass)python -B tests/startup_tools_lint_check.py tools/startup(pass)Refs #2182