Skip to content

Pipelines stage: a module that takes vk_pipeline_check down is skipped and the rest is still checked - #2111

Merged
ItsNotRexed merged 4 commits into
ItsNotRexed:mainfrom
Thatters:fix/pipeline-check-isolate-large
Nov 22, 2026
Merged

ItsNotRexed merged 4 commits into
ItsNotRexed:mainfrom
Thatters:fix/pipeline-check-isolate-large

Conversation

@Thatters

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as a new BUILD item: claim. Related: #884, #881, #903, #1987.

What and why

Since dcd8ecf the two #881/#884 giants pass spirv-val again and are back in the corpus. On NVIDIA the larger one runs the driver's compiler out of memory (LLVM ERROR: out of memory, exit 0x80000003). vk_pipeline_check dies with it, and with it the whole pipelines stage:

Until the translator makes these modules compilable on NVIDIA (#1905 and successors), every NVIDIA user's full build stops there.

The change

vk_pipeline_check

  • --inflight-file F: keeps the names of the modules being compiled in F. It's rewritten when a module over --large-module-bytes starts or finishes (those compile alone since Compile large Vulkan shader modules exclusively #903, so F then names exactly that module), and by the 5 s watchdog for the rest. It's emptied at the end of the pass.
  • --skip-file F: modules named in F aren't compiled. Each is reported as MODULE CRASH <name> (<stage>, killed the driver in an earlier run; not retried) and counted as a failed pipeline, as --isolate does on POSIX. --isolate passes it on to its children, and a missing F is a usage error (exit 2).

make_game.py, pipelines stage

  • It runs the checker with --inflight-file. If the checker exits with anything but 0, 1 or 2 (a crash, not Ctrl+C), the modules in the in-flight file go into pipeline_crashes.txt and the checker runs again with --skip-file. Pipelines already compiled come back from pipeline_cache.bin, which is checkpointed every 10 minutes (pipeline_cache_snapshot: read into a buffer with headroom so a busy cache doesn't fail every checkpoint #1987 makes that reliable on a big cache).
  • If several modules were compiling, each is tried alone (--start/--count in the checker's name-sorted index) and only those that crash alone are skipped.
  • A crash that no module can be named for isn't retried, and neither is Ctrl+C; there are at most 5 restarts.
  • The stage still fails if anything failed, but only after checking everything else, and the error names the modules that took the driver down. pipeline_crashes.txt is cleared at the start of every pipelines stage, so a module gets a fresh chance after a translator change.
  • run() gains check=False and returns the exit code.

Not in this PR: the --isolate child-process mode stays POSIX-only, since a multi-GB cache per child makes it too heavy for the default path. A Windows memory cap for the checker (so the OOM doesn't take other programs down, as on @Proudnoob4's machine) would be a follow-up.

Tested

Windows 11 Pro 25H2, MSVC 14.51 + Ninja (scripts/build_runtime.ps1), NVIDIA RTX 5070 Ti, driver 621.24, on main 4eb6155d:

  • tests/test_make_game_pipelines.py: 6 new cases with a scripted checker:

    • a named crasher is skipped and the rest checked;
    • when several are in flight, each is tried alone and only the crasher is skipped;
    • with no suspect, or after Ctrl+C, there's no retry;
    • the retry limit holds;
    • a clean run is one call, and an old skip list is dropped.
  • All 14 tests/test_make_game*.py files pass (three existing tests updated for run()'s return code and the new argument).

  • End to end on the GPU, with 62 real compute modules (2 over 4 MiB) from my own copy's work folder, through make_game.pipelines(), with VK_PIPELINE_CHECK_SIMULATE_CRASH on one large module:

    1. The first run died (exit 3).
    2. The in-flight file named that module.
    3. The second run checked the other 61 (all ok) and saved the cache.
    4. The stage failed with 1 module(s) took the driver down and were counted as failed: <name>.

    Without the hook: one call, 62/62, exit 0, and the in-flight file is empty afterwards.

  • Build: no new warnings.

  • Not run: a full 26,503-module stage with the real out-of-memory module. That's about 1.5 h to reach it plus a 1.5 h failure, and the in-flight file is written exactly when that module (over 4 MiB, compiled alone) starts.

No game data. AI-assisted.

🤖 Generated with Claude Code

…d and the rest is still checked

Since dcd8ecf the two ItsNotRexed#881/ItsNotRexed#884 giants pass spirv-val and are back in the corpus. On NVIDIA the larger one runs the
driver's compiler out of memory (LLVM ERROR: out of memory, exit 0x80000003), vk_pipeline_check dies with it, and the
pipelines stage stops: on @VeTkN's RTX 5070 (ItsNotRexed#884, c603b8f) about 5,750 pipelines after it were never checked or
cached, and make_game.py exited 1.

vk_pipeline_check:
- --inflight-file F keeps the names of the modules being compiled in F. It is rewritten when a module over
  --large-module-bytes starts or finishes (those compile alone, ItsNotRexed#903, so F then names exactly that module), by the 5 s
  watchdog for the others, and emptied at the end of the pass.
- --skip-file F: modules named in F are not compiled; each is reported as `MODULE CRASH <name> (<stage>, killed the
  driver in an earlier run; not retried)` and counted as a failed pipeline, as --isolate does on POSIX. --isolate
  passes it on to its children. A missing F is a usage error (exit 2).

make_game.py, pipelines stage:
- runs the checker with --inflight-file. When it exits other than 0, 1 or 2 (a crash, not Ctrl+C), the modules in
  the in-flight file are added to pipeline_crashes.txt and the checker runs again with --skip-file; what was already
  compiled comes back from pipeline_cache.bin (checkpointed every 10 minutes). If several modules were compiling, each
  is tried alone (--start/--count in the checker's name-sorted index) and only those that crash alone are skipped.
- a crash no module can be named for is not retried, nor is Ctrl+C, and there are at most 5 restarts.
- the stage still fails when anything failed, now after checking everything else, and names the modules that took
  the driver down. pipeline_crashes.txt is cleared at the start of each pipelines stage, so a module gets a fresh
  chance after a translator change.
- run() takes check=False and returns the exit code.

The --isolate child-process mode stays POSIX-only; with a multi-GB pipeline cache per child it is too heavy for the
default path. A memory cap for the checker on Windows, so the OOM doesn't take other programs down, is a follow-up.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24:
- tests/test_make_game_pipelines.py: 6 new cases (a named crasher is skipped and the rest checked; several in flight
  are tried alone and only the crasher is skipped; no suspect or Ctrl+C is not retried; the retry limit; a clean run is
  one call and an old skip list is dropped). All 14 test_make_game*.py files pass.
- end to end on 62 real compute modules from my own copy's work folder (2 over 4 MiB), through make_game.pipelines:
  with VK_PIPELINE_CHECK_SIMULATE_CRASH on one large module, the first run died (exit 3), the in-flight file named
  that module, the second run checked the other 61 (all ok) and saved the cache, and the stage failed naming it.
  Without the hook: one call, 62/62, exit 0. The in-flight file is empty after a clean pass.
No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matheuskshn

Copy link
Copy Markdown
Contributor

Compatibility finding for the unconditional --inflight-file: existing checker builds can silently treat it as a cache path. The parser on 4eb6155d falls back to else cache_path = a; it does not reject unknown arguments. On Windows 11, RTX 4070 Ti, I ran an older CI checker (2aed144) with one synthetic compute module. The existing invocation wrote cache.bin and exited 0. The invocation from this PR also exited 0, but wrote the Vulkan binary cache to inflight.txt; make_game.py would then delete that file and report success. This affects reused local builds, and matters for the supplied Windows build in #2194 too. Could the wrapper check whether the checker supports the new flags and use the existing invocation if it does not? Checking only the return code will miss this failure. AI-assisted.

…them; the checker rejects unknown options

Review of ItsNotRexed#2111 (@matheuskshn): a vk_pipeline_check built before this PR takes any argument it doesn't know as the
cache path. Run with --inflight-file F, it would write the Vulkan pipeline cache into F and exit 0; make_game.py would
then delete F and report success, with no pipeline_cache.bin. That happens with a reused runtime build or a supplied
Windows build (ItsNotRexed#2194).

- make_game.py asks the checker first: run without arguments it prints its usage before touching Vulkan, and only a
  build that lists --inflight-file and --skip-file gets them and the crash retry. An older build runs exactly as before
  (one call, a crash stops the stage), with a log line saying to rebuild the runtime stage for crash recovery.
- vk_pipeline_check: an unknown --option or a second positional argument is now a usage error (exit 2) instead of
  silently becoming the cache path, so the next new option can't be swallowed the same way.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24:
- checker_supports: True for this build, False for a 6a6704d build (before this PR).
- the new checker: --no-such-option and a second cache path exit 2 with a message.
- make_game.pipelines on 62 real compute modules: with this build and a simulated crash, the module is skipped and
  the other 61 checked, as before; with the 6a6704d build, one call without the new flags, exit 0, and the cache in
  pipeline_cache.bin (6.7 MB), nothing written to pipeline_inflight.txt.
- tests/test_make_game_pipelines.py: 11 tests, 2 new (an older checker gets the old invocation and isn't retried;
  support is read from the usage line). All 14 test_make_game*.py files pass.
No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Thatters

Copy link
Copy Markdown
Contributor Author

Thanks @matheuskshn, good catch: an older checker would have written the 4 GB cache into pipeline_inflight.txt, and the stage would have deleted it and reported success. Fixed in 0c45e9a5:

  • make_game.py asks the checker first. Run without arguments, it prints its usage before touching Vulkan. Only a build that lists both --inflight-file and --skip-file gets them and the crash retry. An older build (a reused one, or a supplied Windows build like BUILD-603: reuse the supplied Windows Vulkan pipeline checker #2194) runs exactly as before: one call with no new flags, where a crash still stops the stage. A log line says to rebuild the runtime stage to get crash recovery.
  • vk_pipeline_check rejects unknown options now. An unknown --option, or a second positional argument, exits 2 with a message instead of becoming the cache path. The next new option can't be swallowed the same way.

Checked on the RTX 5070 Ti / 621.24 with 62 real compute modules through make_game.pipelines():

checker result
this PR, simulated crash on one module that module skipped, the other 61 checked, stage fails naming it (as before)
a 6a6704df build (before this PR) one call without the new flags, exit 0, cache in pipeline_cache.bin (6.7 MB), nothing written to pipeline_inflight.txt
this PR, --no-such-option / two cache paths exit 2, unknown option --no-such-option / unexpected argument b.bin (the cache path is already a.bin)

tests/test_make_game_pipelines.py has 2 new cases: an older checker gets the old invocation and isn't retried, and support is read from the usage line, including a checker that can't run. All 14 test_make_game*.py files pass.

AI-assisted.

@Pipodi

Pipodi commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

A data point for --inflight-file, from a stall on the full corpus (RTX 4090, driver 617.42, Windows 11, main 003e781's checker): inflight gets its entry only just before vkCreateComputePipelines / vkCreateGraphicsPipelines. The time a thread spends in vkCreateShaderModule, or waiting on compile_gate, isn't in the map, either on main or with this PR.

What I saw: twice the run stopped printing pipelines N for more than 5 minutes, both times around index 14,500-16,500. One thread was using a full core (207 s of user CPU) while the other 15 were blocked in an SRW-lock wait (compile_gate is a std::shared_mutex), and the watchdog never printed still compiling. Bisecting 12,000-16,500 into slices found no shader that hangs on its own: cold, the slowest 10-shader slice took 198 s, and every slice finished. So the long stretch is outside what inflight tracks.

If the stage is going to read the file to decide what to skip after a crash, registering the entry before vkCreateShaderModule (and before taking the exclusive gate) would let it name a module that dies or stalls there too. A module / pipeline tag in the entry would tell the two apart. I haven't written this here so as not to collide with your diff; happy to send it as a follow-up if you'd rather keep this PR as it is.

Counts only, no game files. AI-assisted (Claude Code).

…, tagged module or pipeline

Review of ItsNotRexed#2111 (@Pipodi): the in-flight table got its entry only just before vkCreateComputePipelines /
vkCreateGraphicsPipelines, so a thread busy in vkCreateShaderModule (or a large module there, alone behind
compile_gate) was invisible: the watchdog never named it, and --inflight-file couldn't name a module that died there.

- The entry is made once the worker holds compile_gate, before vkCreateShaderModule, with phase "module"; it becomes
  "pipeline" when the pipeline is created, and is removed on every path out of the loop (a pipeline, a skip, a failed
  module). A module over --large-module-bytes writes the file when it enters the driver, not only at its pipeline.
- --inflight-file lines are "name<TAB>phase"; make_game.py reads the name.
- The watchdog says "still creating the shader module of X" or "still compiling X".

Waiting on compile_gate is not in the table: that thread isn't in the driver.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24: the crash end-to-end through
make_game.pipelines on 62 real compute modules (skipped, the other 61 checked); the in-flight file at a simulated
crash reads "<module>\tpipeline" and is empty after a clean pass (62/62). tests/test_make_game_pipelines.py writes the
tab format; all 14 test_make_game*.py files pass. No new warnings. No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Thatters

Copy link
Copy Markdown
Contributor Author

Thanks @Pipodi, that's the right place to register it, and it's the same few lines this PR touches, so I folded it in here rather than splitting it into a follow-up: 2a1bd039.

  • The entry is made before vkCreateShaderModule, once the worker holds compile_gate, with phase module. It becomes pipeline when the pipeline is created, and it's removed on every path out of the loop (a pipeline, a skip, a failed module), so no stale entries.
  • Large modules write the file when they enter the driver, not only at their pipeline. A module that dies in vkCreateShaderModule is named too.
  • --inflight-file lines are now name<TAB>phase. make_game.py reads the name, so the retry treats both phases the same.
  • The watchdog says still creating the shader module of X after Ns or still compiling X after Ns. Your stall (one thread busy at 207 s while the rest wait on the gate) should now name the module.

I left threads waiting on compile_gate out of the table: they aren't in the driver, and listing them would make the stage test innocent modules one by one after a crash. If you want the waiters visible for stall diagnosis, a separate "waiting" line in the watchdog output would do it without touching the skip logic. Happy to leave that to your follow-up.

Re-checked on the RTX 5070 Ti / 621.24:

  • the end-to-end crash run (module skipped, other 61 of 62 checked);
  • the in-flight file at a simulated crash reads <module>\tpipeline, and it's empty after a clean 62/62 pass;
  • all 14 test_make_game*.py files pass.

AI-assisted.

@matheuskshn

Copy link
Copy Markdown
Contributor

Confirmed the compatibility fix on 2a1bd03 on Windows 11, RTX 4070 Ti, driver 621.24. I ran the real make_game.pipelines() entry point with one synthetic compute module and two native binaries (main 4eb6155d and this head). The old binary received only its supported flags, the new one received --inflight-file, and both wrote 17,393 bytes to the intended pipeline_cache.bin. All 11 pipeline and 36 platform tests passed. I closed the overlapping standalone #2243. One minor parser edge remains: an explicit empty positional argument followed by a filename still succeeds because cache_path.empty() also stands for “missing”; that is separate from the fixed compatibility issue and does not affect the wrapper. AI-assisted.

…the cache path

Review of ItsNotRexed#2111 (@matheuskshn): an explicit empty argument followed by a filename was accepted, because an empty
cache_path stood for both "not given" and "given as ''". A flag now records that the cache path was given, so a
second positional argument is always a usage error (exit 2), and the message quotes both values.

Tested: `vk_pipeline_check <dir> "" b.bin` and `<dir> a.bin b.bin` exit 2 with the message; one cache path still runs
(62/62 real compute modules, RTX 5070 Ti / 621.24) and writes the cache. No new warnings. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Thatters

Copy link
Copy Markdown
Contributor Author

Thanks @matheuskshn, for confirming on real binaries and for closing #2243. I fixed the parser edge too, since it was two lines: e77d75dc. A flag now records that the cache path was given, so an empty first positional argument counts as it, and any second positional argument exits 2:

vk_pipeline_check <dir> "" b.bin     -> exit 2: unexpected argument 'b.bin' (a cache path was already given: '')
vk_pipeline_check <dir> a.bin b.bin  -> exit 2: unexpected argument 'b.bin' (a cache path was already given: 'a.bin')

One cache path still runs normally (62/62 real compute modules, RTX 5070 Ti / 621.24), and there are no new warnings.

AI-assisted.

@sovljanskii

Copy link
Copy Markdown
Contributor

Tested e77d75dc3c5233e016440c9bc1112eb144ea9bcb on Apple M4 (MoltenVK 1.4.2), macOS 27.2.1, with my own 1.0.2.1 copy: pass

  • The two new commits: with 2a1bd039, a module is in the in-flight file from vkCreateShaderModule on, as name<TAB>module and then name<TAB>pipeline, and make_game reads the name before the tab. With e77d75dc, an empty first positional argument counts as the cache path, so a second one exits 2. I tested 0c45e9a5 first and then re-ran these on e77d75dc: the build, the unit tests and negative control, a clean run, the SIGKILL run, the in-flight phases, the parser cases and the vk_pipeline_check: create --mesh-compute mesh entries as compute pipelines #2124 merge. Bullets marked 0c45e9a5 were not re-run.

  • Build and unit tests, the same results on both heads: vk_pipeline_check builds with no warnings. test_make_game_pipelines.py 11 OK, test_make_game_dry_run.py 24 OK, test_make_game_platform.py 36 OK, and all 14 tests/test_make_game*.py pass (2 Windows-only skips, the same as on base). With LEONIDA_VK_PIPELINE_CHECK pointing at the built binary: test_vk_pipeline_check_index.py 5 OK, _isolate.py 6 OK, test_make_game_pipeline_preflight.py 12 OK. compileall is clean. Negative control: run against base make_game.py, the 8 new PipelinesCrashRetryTest cases error and the other tests pass. Against 0c45e9a5's make_game.py, the updated file fails 2 cases, because that version doesn't read the tab format.

  • In-flight phases at e77d75dc, polled every 1 ms during the clean run below: each large module showed module for about 15 ms and then pipeline for its whole compile. Small modules showed up only in watchdog snapshots of 3–5 lines, all at pipeline (MoltenVK's vkCreateShaderModule is quick). No line was malformed, and the file was emptied at the end. From reading the code, nothing between the new entry (taken after compile_gate) and the erase at the end of the loop can leave early, so no entry goes stale.

  • No crash, 282 real modules (0c45e9a5) (102 cs, 2 of them just over 4 MiB, plus 100 ps, 40 vs, 20 gs, 20 ms): the base checker and this one with --inflight-file give identical counts. cs 102 ok, ps 100 ok, vs 21 ok / 19 failed (MoltenVK subgroup builtins, rdna2spirv: --no-vertex-subgroups so VS buffer fetches build on MoltenVK (SHADER-302) #1784), gs 20 and ms 20 skipped. Times were 179.8 s and 189.7 s. I sampled the in-flight file every 0.5 s: it held 5 names during the parallel part, exactly the large module for the roughly 52 s the two large modules compiled, and 0 bytes at the end.

  • make_game, clean run: make_game.py --stages pipelines, with spaces in the work and out paths. At 0c45e9a5 I used 82 modules (40 small cs, the 2 large cs, 40 ps); at e77d75dc I used 42 (20 small cs, the same 2 large cs, 20 ps), which took 121.6 s. Each run made one checker call with --inflight-file, every module was ok, the stage exited 0, and pipeline_inflight.txt was removed afterwards.

  • Simulated crash on a large module (real checker, SIGKILL): a watcher sent SIGKILL to the checker as soon as the in-flight file named only the first large module. At 0c45e9a5 that was 0.1 s after the name appeared. At e77d75dc the file read <module>\tmodule, so the checker died during shader module creation, before any pipeline. In both cases make_game:

    • logged … took vk_pipeline_check down (signal 9);
    • put exactly that module in pipeline_crashes.txt;
    • reran with --skip-file, which printed MODULE CRASH … (cs, killed the driver in an earlier run; not retried). The rerun checked the other large module: cs 41 ok / 1 failed and ps 40 ok on the 82 modules, cs 21 ok / 1 failed and ps 20 ok on the 42;
    • failed the stage with exit 1: vk_pipeline_check exited with 1; 1 module(s) took the driver down and were counted as failed: <that module>.

    The in-flight file was removed and the crash list kept. Total 3.7 s and 1.4 s.

  • Simulated crash with several modules in flight (wrapper, SIGSEGV, 0c45e9a5): on 40 ps modules that hadn't been compiled yet, a wrapper set as the checker passed everything through to the real binary. When the in-flight file listed 5 modules, it picked the middle one, sent SIGSEGV and died by the same signal, so make_game saw -11. For the --start/--count runs it armed the checker's own VK_PIPELINE_CHECK_SIMULATE_CRASH for that module, so a run crashes only if it really compiles it. make_game ran 5 one-module runs: only the one at the chosen module's index crashed and the other 4 exited 0, so the name-sorted index matches the checker's. The crash list held that module alone, the rerun gave 39 ok / 1 failed, and the stage exited 1 naming it. 24 s.

  • No retry where none is due (0c45e9a5): SIGINT to the checker mid-run gives one call, exited with signal 2, exit 1. A SIGKILL mid-run while no large module was compiling found the in-flight file empty: one call, … while no module could be named as the cause, exit 1. That is how the stage ends today, and the long out-of-memory compiles this PR targets do get named. A module under --large-module-bytes reaches the file only through the 5 s watchdog, and the file is emptied whenever nothing is compiling.

  • matheuskshn's finding is handled. I reproduced it with the base checker: given --inflight-file X, it still exits 0 and writes the cache into X. At 0c45e9a5:

    • through make_game, the base build gets the has no --inflight-file; rebuild the runtime stage … line and one call without the new flags. It exits 0 with the cache in pipeline_cache.bin (30.9 MB, the same size as with the PR build) and writes no in-flight file;
    • the PR checker exits 2 with a message on an unknown option, on a second positional argument, on --skip-file naming a missing file (also with --isolate), and on either new option without a value.

    At e77d75dc:

    • <dir> "" b.bin and <dir> --jobs 2 "" b.bin exit 2 with unexpected argument '…' (a cache path was already given: ''), and <dir> a.bin b.bin exits 2;
    • <dir> "" alone runs without a cache (1/1 ok, no file written), and <dir> a.bin writes the cache;
    • --isolate with no cache path still runs (2/2 ok).
  • --isolate with --skip-file (0c45e9a5): the counts match the run without --isolate (cs 41/1, ps 40/0), and the not retried line is printed. With a simulated SIGSEGV on another module as well, the bisect found that module and both were reported (cs 41/1, ps 39/1). Nit: under --isolate the per-stage not retried after killing the driver (--skip-file): N line isn't printed, because ISO-RESULT doesn't carry that count. The counts themselves are right.

  • Code read, POSIX side: -2 and -15 count as interrupts; every other negative code counts as a crash, so a SIGKILL from the Linux OOM killer or macOS jetsam is retried. exit_label gives signal N here and 2147483651 (0x80000003) on Windows. Every write of the in-flight file holds mu, and the final emptying sets all_done in the same critical section, so the watchdog can't write after it. The file was 0 bytes at the end of every run. Arguments reach subprocess as a list, so paths with spaces work (tested). I found no bug.

  • Overlap with vk_pipeline_check: create --mesh-compute mesh entries as compute pipelines #2124, the same on both heads: git merge-tree reports one textual conflict in runtime/test/vk_pipeline_check.cpp, a single hunk at the top of the worker loop. This PR keeps const std::string& stage = meta.stage; and adds the skip block below it, and vk_pipeline_check: create --mesh-compute mesh entries as compute pipelines #2124 changes that line to const std::string stage = report_stage(meta);. I resolved it by taking vk_pipeline_check: create --mesh-compute mesh entries as compute pipelines #2124's line and keeping the skip block. The result builds with no warnings, and test_vk_pipeline_check_mesh_compute.py, _isolate.py, _index.py and test_make_game_pipelines.py pass on it. At 0c45e9a5, --skip-file on a mesh entry then gave MODULE CRASH … (ms-compute, …) and ms-compute 19 ok / 1 failed.

No game data. AI-assisted.

@crastinator

Copy link
Copy Markdown
Contributor

Tested e77d75d merged into main ec8ec4c9 (clean merge) on AMD Radeon RX 6700 XT (Navi 22, gfx1031, subgroup 32..64), RADV Mesa 26.3.1, CachyOS, Linux 7.3.5, GCC 16.2.1, llvm-mc 23.1.5: pass.

  • Whole run_gpu_tests.py: 175/189 native, 175/189 with LEONIDA_W64_EMULATE=1 (the skips are the D3D12-only fixtures and ps_w64x_readlane, as on main). ctest 37/37.

No game files. AI-assisted (Claude Code).

@mrp1no

mrp1no commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Post-merge run of the pipelines stage with this PR (e77d75d), on my full 1.0.2.1 work folder (26,501 modules), RTX 3060 / 610.88, 8 threads, under a per-process commit cap. The in-flight file and the single re-checks work as described. Twice, at about module 7,500 with a 20 GB cap and about 13,750 with 26 GB, the 8 in-flight modules were each re-run alone and all passed, so the stage stopped with no module could be named, as designed. It looks like memory growing with the pipeline cache rather than one bad module. Details and counts are in the finding. Counts only. AI-assisted (Claude Code).

@Impre-visible

Copy link
Copy Markdown

Ran the pipelines stage of main 4c52ce2 (this PR included) on the whole corpus, on NVIDIA GeForce GTX 1660 (Turing, TU116, 6 GB, subgroup 32..32), driver 620.73.04 (proprietary, Vulkan 1.4.357), Arch Linux (kernel 6.18), i7-13700KF, 62 GB RAM + 3 GB swap, --jobs 12. Shaders translated at 4eb6155 with wave64 emulation on (26,487 modules, all spirv-val valid).

The skip-and-continue path works end to end on real modules. vk_pipeline_check went down 4 times; each time the stage named one module, wrote it to pipeline_crashes.txt, restarted from the cache and went on. Final exit 1 with "4 module(s) took the driver down and were counted as failed", and every other module was checked.

modules ok pipelines ok failed
ps 12,101 12,101 0
ms 9,282 9,282 0
vs 2,236 2,236 0
gs 195 195 0
cs 2,666 2,666 3 module + 4 not retried
  • 26,480 of 26,487 pipelines created; all 7 failures are compute.
  • 3 are the SHADER-309 limit: workgroup memory 65,536 bytes (1 module) and 74,140 bytes (2 modules) against this card's maxComputeSharedMemorySize of 49,152.
  • 4 are driver memory, not a crash by itself: I ran a watchdog that sends SIGKILL to the checker before the machine swaps out, and the stage treated that signal 9 like a driver crash, which is the right outcome. Checker RSS when killed: 51 GB, 42 GB, 47 GB and 47 GB. Their SPIR-V sizes are 5.4 MB, 29.3 MB, 54.5 MB and 54.3 MB; three are "emulated wave64 rounds" compute modules, the 29.3 MB one is structured wave32. The 42 GB one was stopped at my watchdog's threshold and might fit on a machine with more memory; the other three were still growing with 2 to 6 GB of RAM left.
  • So SPIR-V size alone does not predict it: a 5.4 MB module went past 51 GB in about 5 minutes, while 708 modules over 4 MB were "checked exclusively" without trouble.
  • Two more compute modules (2.2 MB and 2.7 MB of SPIR-V) are fine alone but expensive: 384 s / 12 GB peak and 605 s / 19 GB peak with --jobs 1 --start/--count. Compiled at the same time under --jobs 12 they took the checker to 38 GB. On a 32 GB machine that pair would be an out-of-memory kill with no single module to blame (crashes_alone is false for both), so the stage would stop with "no module could be named as the cause". A lower --jobs avoids it; an RSS-aware throttle in the checker would be the general fix.
  • Timing: 8,083 s wall for the last run of the checker (most of the 26,487 came back from the cache); about 10 hours in total from a cold cache, including the restarts and one earlier run on the pre-Pipelines stage: a module that takes vk_pipeline_check down is skipped and the rest is still checked #2111 checker that stopped at module 20,000. Final pipeline_cache.bin: 5.0 GB.
  • I did not let any of them run to the kernel OOM killer, so I cannot say whether more memory would let those three finish; with 62 GB they do not.

AI-assisted run (Claude). Counts only; nothing from the game leaves this machine.

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.

8 participants