runtime/README: LEONIDA_COMPILE_GATE is on by default (DOC-COMPILE-GATE-DEFAULT) #2400

Closed
wavehs wants to merge 1 commit from upstream-pr/2400 into main
wavehs commented 2026-11-26 19:34:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T19:34:15Z.


Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7201716102

Depends on: none.

What and why

runtime/README.md documents LEONIDA_COMPILE_GATE as off when unset ("Unset: the asynchronous workers compile while other queues submit"). The code makes it on unless the value is 0: SubmitMutex::compile_gate_enabled() (runtime/src/vulkan_device_fault.h:425) returns !(value && !std::strcmp(value, "0")), and DriverTurn (runtime/shims/d3d12_pipeline_compile.h:181) takes a CompileTurn around every compute pipeline create. So a default run gates, which is what OreoFR measured in the coordination issue (1,056 submissions waiting, 434 s in all, on an RTX 4070 Laptop with NVIDIA 621.40). The default itself is deliberate (#2098 added the gate after a vkQueueSubmit during vkCreateComputePipelines returned VK_ERROR_DEVICE_LOST on NVIDIA 630.20), so the README row is the stale half.

The row now states the real default (on), keeps 0 as the off switch, and says that a submission arriving during a create waits for it. Docs only; no code or behaviour change.

Before / after

A scripted check over the row and compile_gate_enabled() on main 2d43417d4 and on this branch:

main: README default='unset', says-unset-is-off=True; code on-unless-'0'=True; MISMATCH
fix:  README default='on',    says-unset-is-off=False; code on-unless-'0'=True; consistent

Tested

On macOS 27.2.1 arm64 (CPython 3.15.2), docs only, no build and no game files:

  • python3 -I tests/test_docs_env_vars.py -> 4 tests, OK
  • python3 -I tests/test_docs_table_rows.py -> 2 tests, OK
  • python3 -I tests/test_docs_links.py -> 17 tests, OK
  • python3 -I tests/test_docs_encoding.py -> 1 test, OK
  • python3 -I scripts/check_no_game_data.py runtime/README.md -> exit 0

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5516073392 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2400). Originally posted by [wavehs](https://github.com/wavehs) on 2026-11-26T19:34:15Z. --- Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7201716102 Depends on: none. ### What and why `runtime/README.md` documents `LEONIDA_COMPILE_GATE` as off when unset ("Unset: the asynchronous workers compile while other queues submit"). The code makes it on unless the value is `0`: `SubmitMutex::compile_gate_enabled()` (`runtime/src/vulkan_device_fault.h:425`) returns `!(value && !std::strcmp(value, "0"))`, and `DriverTurn` (`runtime/shims/d3d12_pipeline_compile.h:181`) takes a `CompileTurn` around every compute pipeline create. So a default run gates, which is what OreoFR measured in the coordination issue (1,056 submissions waiting, 434 s in all, on an RTX 4070 Laptop with NVIDIA 621.40). The default itself is deliberate (#2098 added the gate after a `vkQueueSubmit` during `vkCreateComputePipelines` returned `VK_ERROR_DEVICE_LOST` on NVIDIA 630.20), so the README row is the stale half. The row now states the real default (`on`), keeps `0` as the off switch, and says that a submission arriving during a create waits for it. Docs only; no code or behaviour change. ### Before / after A scripted check over the row and `compile_gate_enabled()` on `main` `2d43417d4` and on this branch: ```text main: README default='unset', says-unset-is-off=True; code on-unless-'0'=True; MISMATCH fix: README default='on', says-unset-is-off=False; code on-unless-'0'=True; consistent ``` ### Tested On macOS 27.2.1 arm64 (CPython 3.15.2), docs only, no build and no game files: - `python3 -I tests/test_docs_env_vars.py` -> 4 tests, OK - `python3 -I tests/test_docs_table_rows.py` -> 2 tests, OK - `python3 -I tests/test_docs_links.py` -> 17 tests, OK - `python3 -I tests/test_docs_encoding.py` -> 1 test, OK - `python3 -I scripts/check_no_game_data.py runtime/README.md` -> exit 0 AI-assisted.
aslan2142 commented 2026-11-27 12:03:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-27T12:03:25Z.


Closing as superseded by #2412, which just landed on main and updates the LEONIDA_COMPILE_GATE row in runtime/README.md to document the default (on (classic)) alongside the new adaptive mode. Thanks for catching the stale unset default.

AI-assisted (Antigravity, Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7217786129 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2400#issuecomment-7217786129). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-27T12:03:25Z. --- Closing as superseded by #2412, which just landed on `main` and updates the `LEONIDA_COMPILE_GATE` row in `runtime/README.md` to document the default (`on (classic)`) alongside the new `adaptive` mode. Thanks for catching the stale `unset` default. AI-assisted (Antigravity, Gemini 4 Neon).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!2400
No description provided.