[PR #640] [CLOSED] make_game.py: add --max-compile-time to the pipelines stage (PIPELINE-TIMEOUT) #681

Closed
opened 2026-11-26 20:18:41 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/640
Author: @Natakout
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: fix/pipeline-compile-timeout


📝 Commits (1)

  • 8e89bc4 make_game.py: add --max-compile-time to the pipelines stage (PIPELINE-TIMEOUT)

📊 Changes

3 files changed (+106 additions, -10 deletions)

View changed files

📝 make_game.py (+104 -8)
📝 tests/test_make_game_argparse.py (+1 -1)
📝 tests/test_make_game_dry_run.py (+1 -1)

📄 Description

make_game.py: add --max-compile-time to the pipelines stage (PIPELINE-TIMEOUT)

Claimed in the coordination issue as: PIPELINE-TIMEOUT

What and why

The pipelines stage runs vk_pipeline_check on every translated SPIR-V
module. Some modules -- the ScreenProbes family (15-24 MB under
--wave64-emulate) and the RaytracingResolve family (~6.5 MB, ~996
modules) -- cause the NVIDIA driver's shader compiler to run for hours,
blocking the entire build indefinitely (#584).

This change adds a --max-compile-time flag (default 300 seconds) to
make_game.py. When a vk_pipeline_check batch exceeds the time limit,
the process is killed and the modules that were in flight (read from
--inflight-file) are added to the skip list. The build continues with
the remaining shaders. Timed-out modules are reported as skipped, not
as failures, so they do not cause the build to fail.

The implementation runs the existing run() call in a worker thread and
joins with a timeout. On expiry, it kills the checker process (taskkill
on Windows, pkill on Linux) and reads the inflight file. This preserves
compatibility with the test suite that mocks make_game.run().

No changes to vk_pipeline_check itself; only standard-library Python.

What was tested

  • All 434 make_game tests pass on Windows 11 (Python 3.13.3).
  • compileall clean.
  • make_game.py --help shows the new flag.
  • Verified on RTX 3060 (Windows 11): the two ScreenProbes modules
    (Jindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbes_9083c094
    and Hindirect_diffuse_lighting_CS_ScreenProbes_ActivateRays_d60186e6)
    that blocked the build for 7+ hours are now skipped after 300s, and
    the pipelines stage completes the remaining ~26,500 modules.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/640 **Author:** [@Natakout](https://github.com/Natakout) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/pipeline-compile-timeout` --- ### 📝 Commits (1) - [`8e89bc4`](https://github.com/ubiquitarianism/leonida/commit/8e89bc4bee622172b7a37e0c578cb21a9e97b93a) make_game.py: add --max-compile-time to the pipelines stage (PIPELINE-TIMEOUT) ### 📊 Changes **3 files changed** (+106 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `make_game.py` (+104 -8) 📝 `tests/test_make_game_argparse.py` (+1 -1) 📝 `tests/test_make_game_dry_run.py` (+1 -1) </details> ### 📄 Description make_game.py: add --max-compile-time to the pipelines stage (PIPELINE-TIMEOUT) Claimed in the coordination issue as: PIPELINE-TIMEOUT What and why The pipelines stage runs vk_pipeline_check on every translated SPIR-V module. Some modules -- the ScreenProbes family (15-24 MB under --wave64-emulate) and the RaytracingResolve family (~6.5 MB, ~996 modules) -- cause the NVIDIA driver's shader compiler to run for hours, blocking the entire build indefinitely (#584). This change adds a --max-compile-time flag (default 300 seconds) to make_game.py. When a vk_pipeline_check batch exceeds the time limit, the process is killed and the modules that were in flight (read from --inflight-file) are added to the skip list. The build continues with the remaining shaders. Timed-out modules are reported as skipped, not as failures, so they do not cause the build to fail. The implementation runs the existing run() call in a worker thread and joins with a timeout. On expiry, it kills the checker process (taskkill on Windows, pkill on Linux) and reads the inflight file. This preserves compatibility with the test suite that mocks make_game.run(). No changes to vk_pipeline_check itself; only standard-library Python. What was tested - All 434 make_game tests pass on Windows 11 (Python 3.13.3). - compileall clean. - make_game.py --help shows the new flag. - Verified on RTX 3060 (Windows 11): the two ScreenProbes modules (Jindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbes_9083c094 and Hindirect_diffuse_lighting_CS_ScreenProbes_ActivateRays_d60186e6) that blocked the build for 7+ hours are now skipped after 300s, and the pipelines stage completes the remaining ~26,500 modules. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:41 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#681
No description provided.