Skip to content

make_game: on Windows the pipelines stage runs the checker under the runtime's file name, so its cache hits on AMD - #7538

Closed
sennecools wants to merge 1 commit into
ProjectLeonida:mainfrom
sennecools:pipelines-stage-runtime-name
Closed

sennecools wants to merge 1 commit into
ProjectLeonida:mainfrom
sennecools:pipelines-stage-runtime-name

Conversation

@sennecools

@sennecools sennecools commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: RT-622, claim (follow-up of RT-575)

Depends on: #7501 (the checker's device features; without it the cache still misses on AMD). The two touch different sections of docs/pipeline_check.md.

What and why

AMD's Windows driver makes the program's file name part of its pipeline cache key (its folder is not). The same checker binary under another name misses the cache it wrote, so the pipeline_cache.bin the pipelines stage writes as vk_pipeline_check.exe never hits in gta6rt.exe.

On Windows the stage now runs the checker as a copy named gta6rt.exe in <work>/pipeline_check. The checker imports only KERNEL32.dll, so the copy runs from any folder. If the copy cannot be made the stage says so and runs the checker under its own name. Other hosts are unchanged.

Tested

Windows 11, Python 3.12, RX 9070 XT (driver 32.0.32029.2010).

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (no translator rule here)

…runtime's file name

AMD's Windows driver makes the program's file name part of its pipeline cache
key, so a cache written by vk_pipeline_check.exe never hits in gta6rt.exe. The
stage now runs a copy of the checker named gta6rt.exe from the work folder.

AI-assisted.

@leoleahy leoleahy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Windows 11 / Python 3.14.8 review of 29972c4f (synthetic inputs, CPU only, no game data).

Checks run

  • python -I tests/test_make_game_pipelines.py: 17/17 OK on 29972c4f (parent 0433058a: 3 failures, 1 error across PipelinesCheckerNameTest and PipelinesJobsTest).
  • python -I tests/test_make_game_dry_run.py: 24/24 OK on 29972c4f (parent 0433058a: 1 failure on PipelineStageIsolationTest).
  • Additional related suites on 29972c4f: tests/test_make_game_pipeline_batches.py (15/15 OK), tests/test_make_game_pipeline_preflight.py (16 OK, 1 skipped), tests/test_make_game_platform.py (46 OK, 2 skipped), tests/test_make_game_preflight.py (95 OK, 1 skipped).
  • python -m compileall -q make_game.py tests/test_make_game_dry_run.py tests/test_make_game_pipelines.py, git diff --check 0433058a..29972c4f, and git merge-tree --write-tree upstream/main HEAD: all clean.

Code review notes

  • checker_named_like_runtime() cleanly returns exe untouched on non-Windows hosts, copies to <work>/pipeline_check/gta6rt.exe (RUNTIME_FILES[0]) on Windows so both checker_supports() and run() invoke the copy, and gracefully logs and falls back to exe on any OSError (including PermissionError or shutil.SameFileError).

LGTM.

AI-assisted.

@chrisx599

Copy link
Copy Markdown

Independent GPU check of #7538 at 29972c4f on a Radeon RX 6750 GRE 10GB. AMD 26.11.2 (Windows driver 32.0.21045.29003), Vulkan 1.4.315, Windows 11 25H2 (26200.9974), Python 3.13.1 and MSVC 19.44.35230.

I ran the real make_game.py --stages pipelines --jobs 1 --no-tui CLI using a minimal synthetic package fixture for preflight and one synthetic compute shader. Both variants used the same checker build from #7501 (c8a102d0), the same shader and work/output paths, and the same #7501 runtime cache-test executable named gta6rt.exe. Each run generated a fresh pipeline_cache.bin. Implicit Vulkan layers were disabled.

Pipelines stage source Checker process Pipelines created Runtime application-cache hits
PR parent 0433058a1 vk_pipeline_check.exe 1/1 on all three runs 0/3
#7538 29972c4f staged copy named gta6rt.exe 1/1 on all three runs 3/3

All six CLI runs exited 0. I verified the staged checker matched the original binary byte for byte. The runtime hit its own cache in all three baseline miss controls.

On the patched tree, test_make_game_pipelines.py, test_make_game_dry_run.py, test_make_game_pipeline_batches.py and test_make_game_pipeline_preflight.py ran 72 tests with 71 passes and one skip. Synthetic fixtures only. AI-assisted with Codex.

@airp1ane

Copy link
Copy Markdown
Contributor

Tested 29972c4 on Windows 11, Python 3.15.2, NVIDIA RTX 4060 Ti (driver 621.24; CPU-only checks, no game files, no GPU/llvm-mc/MSVC used): pass.

Ran the test files this PR adds or changes, from a clean checkout of the PR head: test_make_game_dry_run.py, test_make_game_pipelines.py - all exit 0.

AI-assisted (Claude Code).

@rideinstead

Copy link
Copy Markdown

✅ Automated security review: CLEAN (commit 29972c4f)

  • No findings.

Scope: static analysis of added diff lines only; no code was executed. Please review findings manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants