Skip to content

Windows boot: LEONIDA_DEVICE_FAULT=2 by default, so a boot on NVIDIA reads the precompiled compute journal (BOOT-DEVICE-FAULT-2) - #2599

Merged
MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
enlight3d:fix/boot-device-fault-keeps-journal
Nov 29, 2026
Merged

MoonEyes merged 1 commit into
ProjectLeonida:mainfrom
enlight3d:fix/boot-device-fault-keeps-journal

Conversation

@enlight3d

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: BOOT-DEVICE-FAULT-2 (#2570 (comment))

What and why

scripts/windows-boot/boot.ps1 sets LEONIDA_DEVICE_FAULT=1 when the shell has not set it. On NVIDIA, 1 also turns on VK_NV_device_diagnostics_config (runtime/shims/d3d12_vulkan_device.cpp:23349-23360, READ IN CODE), and the runtime then adds nv-diagnostics-config to the key of every compute journal file (d3d12_vulkan_device.cpp:11818-11824, READ IN CODE). So a boot looked for different file names than the ones gta6rt --precompile-pipelines writes without the variable, and read none of the precompiled journal, even though boot.ps1 has passed that journal to the boot as its seed since #2481.

The runtime already has a mode for this case. With LEONIDA_DEVICE_FAULT=2 it keeps the device-fault report (VK_EXT_device_fault), the NVIDIA checkpoints and the submit ring, and leaves out the diagnostics config (with_config, d3d12_vulkan_device.cpp:23355, READ IN CODE). This pull request makes 2 the default:

  • boot.ps1: the default changes from "1" to "2". One exception: when the final environment has LEONIDA_AFTERMATH=1 and the user did not set LEONIDA_DEVICE_FAULT (not in the shell, not with -SetEnv, not as a KEY=VALUE argument), the script uses 1. The runtime takes the LEONIDA_DEVICE_FAULT branch before the Aftermath one (d3d12_vulkan_device.cpp:23352-23371, READ IN CODE), so under 2 a crash dump would lose NVIDIA's diagnostics config and its shader debug info, which the old default gave it. A value the user gives always wins.
  • The comment over the defaults said they match the Linux harness. It now says some are shared with it, and that it does not set LEONIDA_DEVICE_FAULT.
  • scripts/windows-boot/README.md: the LEONIDA_DEVICE_FAULT row gives 2 and says what it keeps. It says that 1 adds the diagnostics config and is used automatically with LEONIDA_AFTERMATH=1. It also says that under 2, "NVIDIA diagnostics config unavailable" in the runtime's [rt] device-fault: enabled line means the config was not requested, not a driver problem. The LEONIDA_PIPELINE_JOURNAL_SEED_DIR row no longer says the script sets 1.

Overrides work as before. A trailing LEONIDA_DEVICE_FAULT=1 argument still turns on the full diagnostics config for one boot (so do the shell and -SetEnv), and LEONIDA_DEVICE_FAULT= leaves the variable unset.

What was measured (MEASURED, n=1 per cell, so these are observations, not settled numbers):

  • MACHINE: NVIDIA GeForce RTX 3090, 24 GB, desktop | driver 621.40 | Windows 11 Pro | 64 GB
  • Setup: two builds. Each had its own fresh compute pre-compile (gta6rt --precompile-pipelines, run without the variable), then an A/B pair of 60 s boots of that same build: 1 against unset on 1bc055e, unset against 2 on ace0e9d. No commit between the two builds touches d3d12_vulkan_device.cpp, vulkan_device_fault.h or pipeline_cache_journal.h (git log 1bc055e6c..ace0e9d1c -- <those three paths> is empty; the range has 64 commits).
  • Measured value: the counters on the runtime's last pipeline journal progress line within the 60 s. The runtime prints that line at the first event of a kind, then at every 100th.
build LEONIDA_DEVICE_FAULT from the precompiled journal compiled
1bc055e 1 (the old default) 0 500
1bc055e unset 700 0
ace0e9d unset 700 0
ace0e9d 2 (the new default) 700 0

With 1 the line said 25 from journal files, and 500 compiled and written. The 25 were re-reads of files that the same boot had just written, as zmasi read it on #2570. The boot's writable journal gained about 519 files, which confirms it. So none came from the precompiled journal.

Tested

The tests came first. tests/test_windows_boot_journal_seed.py gets nine cases. Eight run boot.ps1 -DryRun (no launch, no game files):

  • the default is 2;
  • LEONIDA_DEVICE_FAULT=1 wins when given on the command line, in the shell, or with -SetEnv (three cases);
  • LEONIDA_DEVICE_FAULT= removes the variable;
  • LEONIDA_AFTERMATH=1 gives 1, whether it comes as an argument, from the shell or from -SetEnv;
  • LEONIDA_AFTERMATH=1 with a LEONIDA_DEVICE_FAULT=2 the user gave (argument, shell or -SetEnv) keeps 2;
  • LEONIDA_AFTERMATH=0 keeps 2 (no LEONIDA_AFTERMATH at all is the default case).

The ninth reads the README as plain text, with the Markdown marks dropped, so it runs on every OS. It checks that the row's default is 2 and that no text says the script sets 1. Six of the nine already pass on main and pin existing behaviour: the three overrides, the removal and the two Aftermath cases.

Red, on main 0a32535 with only the test file added (the whole file, run with python -I):

FAIL: test_aftermath_off_keeps_the_default (__main__.BootJournalSeedTest.test_aftermath_off_keeps_the_default)
AssertionError: '1' != '2'
FAIL: test_device_fault_default_leaves_the_journal_names_alone (__main__.BootJournalSeedTest.test_device_fault_default_leaves_the_journal_names_alone)
AssertionError: '1' != '2'
FAIL: test_readme_gives_the_default_2 (__main__.DeviceFaultReadmeTest.test_readme_gives_the_default_2)
AssertionError: '1' != '2'
Ran 26 tests in 14.678s
FAILED (failures=3)

With the default at 2 but no Aftermath exception yet, test_aftermath_gets_the_diagnostics_config failed in its three subtests ('2' != '1'; Ran 26 tests, FAILED (failures=3)).

Mutations of boot.ps1, each run against the full file: default back to "1" fails 2 tests. Without the Aftermath exception, 3 subtests fail. Without the -SetEnv loop, 3 tests fail.

Green, with the change. Each file ran in its own process with python -I (Python 3.13.12, Windows 11, Windows PowerShell 5.1):

What was not checked:

  • AMD: not run. zmasi's reading of the code on Coordinating who works on what (continued from #1608) #2570 is that the journal names do not change on AMD, because AMD drivers do not offer VK_NV_device_diagnostics_config. If so, 2 behaves there as 1 did (READ IN CODE, by zmasi).
  • Linux: the Linux harness (scripts/linux-boot/) does not set LEONIDA_DEVICE_FAULT, so nothing changes there.
  • No device loss was provoked under 2, so this pull request does not exercise the fault report in that mode. That runtime path already existed and is unchanged.
  • No boot with LEONIDA_AFTERMATH=1 was run. Only the dry runs above check the exception.

Not in this PR: docs/running.md:57, docs/d3d12_vulkan.md and runtime/README.md still document only LEONIDA_DEVICE_FAULT=1 (a follow-up). The runtime's "NVIDIA diagnostics config unavailable" under 2 (runtime/src/vulkan_device_fault.h:1171-1173) says "unavailable" for a config it did not request; that is a finding, not fixed here.

Credits: MoonEyes posted the finding on #2570 (#2570 (comment)). zmasi pointed out there that mode 2 already exists and suggested this change (#2570 (comment)), and read the 25 journal reads under 1 as the boot's own files.

GPUs tested: NVIDIA GeForce RTX 3090 24 GB, driver 621.40, Windows 11 (profile L), for the four boots above. The unit tests need no GPU.

AI-assisted: yes (Claude Code, Claude Opus 5.5)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • 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. (n/a: no translator change)

🤖 Generated with Claude Code

…reads the compute journal gta6rt --precompile-pipelines wrote (1 with LEONIDA_AFTERMATH=1)

boot.ps1 set LEONIDA_DEVICE_FAULT=1 when the shell had not set it. On NVIDIA, 1 also enables
VK_NV_device_diagnostics_config (d3d12_vulkan_device.cpp:23349-23360), and the runtime then
puts that config into the key of every compute journal file (d3d12_vulkan_device.cpp:11818-11824,
"nv-diagnostics-config"). So a boot read none of the journal a pre-compile without the variable
had written, though boot.ps1 hands that journal to the boot as its seed since ProjectLeonida#2481. 2 is the
runtime's mode for this case: the device-fault report, checkpoints and the submit ring, without
the diagnostics config.

LEONIDA_AFTERMATH=1 still gets 1. The runtime takes the LEONIDA_DEVICE_FAULT branch before the
Aftermath one (d3d12_vulkan_device.cpp:23352-23371), so under 2 a crash dump would lose NVIDIA's
diagnostics config (no shader debug info). A LEONIDA_DEVICE_FAULT the user gives (shell, -SetEnv
or KEY=VALUE) always wins, and LEONIDA_DEVICE_FAULT= leaves it unset, as before.

Measured on an RTX 3090 24 GB, NVIDIA 621.40, Windows 11: two builds, each with its own fresh
compute pre-compile and an A/B pair of 60 s boots of that build, n=1 per cell. The counts are
from the runtime's last "pipeline journal" progress line within the 60 s (it prints at the
first event of a kind, then every 100th):

  build      LEONIDA_DEVICE_FAULT  from the precompiled journal  compiled
  1bc055e  1                       0                           500
  1bc055e  unset                 700                             0
  ace0e9d  unset                 700                             0
  ace0e9d  2                     700                             0

With 1 the line said 25 from journal files: files that same boot had just written (zmasi's
reading on ProjectLeonida#2570; the boot's writable journal gained about 519 files). No commit in
1bc055e..ace0e9d touches d3d12_vulkan_device.cpp, vulkan_device_fault.h or
pipeline_cache_journal.h. Found by MoonEyes on ProjectLeonida#2570; zmasi pointed there at mode 2.

The README's row says 2, when 1 is used, and that "NVIDIA diagnostics config unavailable" in
the runtime's device-fault line means "not requested" under 2. Its seed row no longer says the
script sets 1. The comment over the defaults says the Linux harness does not set the variable.

Test: tests/test_windows_boot_journal_seed.py, dry runs for the default, the shell, -SetEnv and
KEY=VALUE overrides, the removal and LEONIDA_AFTERMATH, and the README row (read as text, on any
system).

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

zmasi commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

#2599 | head 202ad50 (merged cleanly onto origin/main d8c10dd) | Windows 11 (10.0.26200.9974), Windows PowerShell 5.1, Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11 + PowerShell)

  • Diff & safety audit: Inspected 100% of the diff across scripts/windows-boot/boot.ps1 (defaulting LEONIDA_DEVICE_FAULT to "2", tracking explicit shell / -SetEnv / KEY=VALUE overrides in $given, and promoting default LEONIDA_DEVICE_FAULT to "1" when LEONIDA_AFTERMATH is "1" unless explicitly provided), scripts/windows-boot/README.md, and tests/test_windows_boot_journal_seed.py. python -I scripts/check_no_game_data.py scripts/windows-boot/README.md scripts/windows-boot/boot.ps1 tests/test_windows_boot_journal_seed.py passed (rc=0).
  • Red -> Green on native Windows 11 (powershell.exe -NoProfile -ExecutionPolicy Bypass -DryRun):
    • Red (origin/main d8c10dd5e1 boot.ps1 + README.md): Running #2599's tests/test_windows_boot_journal_seed.py against unpatched boot.ps1 and README.md failed 3 of 26 tests (FAILED (failures=3): test_device_fault_default_leaves_the_journal_names_alone, test_aftermath_off_keeps_the_default, and test_readme_gives_the_default_2, all reporting '1' != '2').
    • Green (#2599 + origin/main):
      • python -I tests/test_windows_boot_journal_seed.py -v -> 26/26 passed (0 skipped, OK, 22.538s), verifying default LEONIDA_DEVICE_FAULT=2, CLI KEY=VALUE / shell environment / -SetEnv @{} overrides, LEONIDA_DEVICE_FAULT= removal, LEONIDA_AFTERMATH=1 auto-selection of LEONIDA_DEVICE_FAULT=1 while preserving explicit user LEONIDA_DEVICE_FAULT=2, LEONIDA_AFTERMATH=0 keeping 2, NTFS junction / \\?\ / \\.\ / relative path seed checks, and DeviceFaultReadmeTest.
      • Doc verification suites: test_docs_table_rows.py (2/2), test_docs_repo_paths.py (5/5), test_docs_encoding.py (1/1), test_docs_env_vars.py (5/5) -> all OK.

@OreoFR

OreoFR commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

TAKEN by OreoFR: game boot A/B on RTX 4070 Laptop 8 GB

@OreoFR

OreoFR commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

#2599 game boot A/B: boot.ps1 default LEONIDA_DEVICE_FAULT 1 (main) / 2 (this PR), with a precompiled journal

Local test, AI-assisted (Claude Code, Claude Opus 5.5). Values only: no captures, logs or game paths leave this machine.

  • Machine: RTX 4070 Laptop 8 GB (ReBAR), NVIDIA 621.40, Windows 11, Intel Core Ultra 7 155H, 40 GB RAM
  • Scripts: A = scripts/windows-boot/boot.ps1 of origin/main 59e65849b; B = 59e65849b + local git merge --no-ff
    of Windows boot: LEONIDA_DEVICE_FAULT=2 by default, so a boot on NVIDIA reads the precompiled compute journal (BOOT-DEVICE-FAULT-2) #2599 head 202ad50e5 (clean). Windows boot: LEONIDA_DEVICE_FAULT=2 by default, so a boot on NVIDIA reads the precompiled compute journal (BOOT-DEVICE-FAULT-2) #2599 re-checked 2026-11-29 02:37 UTC: OPEN, head still 202ad50e5.
  • Runtime: the same gta6rt.exe for all seven boots, built from main 0a325350e. git diff 0a325350e 59e65849b -- runtime is empty, and Windows boot: LEONIDA_DEVICE_FAULT=2 by default, so a boot on NVIDIA reads the precompiled compute journal (BOOT-DEVICE-FAULT-2) #2599 touches no runtime/ file, so it is the runtime of both arms.
  • Seed: gta6rt --precompile-pipelines --smallest-first --max-bytes 1048576 --threads 16 --big-threads 4 beside that
    gta6rt.exe, with no LEONIDA_DEVICE_FAULT, no LEONIDA_AFTERMATH, no LEONIDA_PIPELINE_CACHE_DIR. Stopped by me
    after 783 s: 2,378 compute entries journaled (the smallest, up to about 0.5 MB of SPIR-V; the whole library has
    5,453). boot.ps1 passed it as LEONIDA_PIPELINE_JOURNAL_SEED_DIR in every boot of both arms (-DryRun and each
    boot's printed environment show it).
  • Recipe: boot.ps1 -GameDir -Shaders -Runtime -OutDir, nothing else set (default input script a@45,a@60,a@75,a@90,
    default captures; no LEONIDA_PEEK RVAs, so no game/session states). -Seconds 150 for A1/B1, then 210 for the
    rest because B1 had not started rendering by 150 s.
  • Order: A1, B1, B2, A2, B3, A3, B4 (B4 added: B1 cut before rendering, B3 crashed).
  • Measured: (1) from the runtime's pipeline journal progress lines (printed at the first event of a kind, then every
    100th, so a count is a floor to the hundred): "from journal files"; (2) compiles = files in the boot's own, fresh
    journal at the end (one written per compute pipeline compiled); (3) seconds from process start to the first
    PresentX ok; (4) the runtime's submit phases lines: t of the first 5 s window at 5 frames/s or more ("rendering
    from"), the median frames/s of the windows after it, and how many of them were under 5 frames/s; (5) the
    [rt] device-fault: enabled line.

Prediction (written before the first boot)

A reads about 0 entries from the seed (key mismatch: nv-diagnostics-config) and compiles every compute pipeline it
uses; B reads most of the boot's compute pipelines from the seed and compiles only the ones larger than the seed's
cut; B's device-fault line says fault info on, checkpoints on, diagnostics config "unavailable"; B reaches its first
frame sooner than A.

RUN p2599-A1

RUN p2599-A1 | 2026-11-29 UTC | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        59e65849b (boot.ps1 of main) | gta6rt built from 0a325350e (runtime identical to 59e65849b)
MACHINE:     RTX 4070 Laptop 8 GB, laptop | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented (scripts/windows-boot/README.md, boot.ps1 defaults) + DEVIATIONS: -Seconds 150 | seed: precompile without LEONIDA_DEVICE_FAULT, 2,378 smallest entries
OS/DRIVER:   defaults; boot.ps1-set LEONIDA_DEVICE_FAULT=1
TARGET:      compute pipelines from journal files / compiled; first frame | PREDICTED: ~0 from the seed, all compiled
MEASURED:    from journal files: 5 (last progress line, at 100 written) | compiled: 102 | first PresentX 104 s | rendering from t=127 s, median 9.6 frames/s (5 windows, 0 under 5) | PresentX ok 281
DIAG LINE:   device-fault: fault info on, checkpoints on, NVIDIA diagnostics config on
END:         time limit (170 s); no device loss, no fault records
CACHES:      boot's pipeline cache and journal fresh (own folder); seed read-only; NVIDIA driver cache not cleared | RUN 1 of 3 for A
VERDICT:     prediction held (the 5 are re-reads of files this boot wrote; seed names cannot match, see verdict)

RUN p2599-B1

RUN p2599-B1 | 2026-11-29 UTC | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        59e65849b + #2599 (202ad50e5), local merge | gta6rt built from 0a325350e (runtime identical to 59e65849b)
MACHINE:     RTX 4070 Laptop 8 GB, laptop | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented (scripts/windows-boot/README.md, boot.ps1 defaults) + DEVIATIONS: -Seconds 150 | seed: as A1
OS/DRIVER:   defaults; boot.ps1-set LEONIDA_DEVICE_FAULT=2
TARGET:      compute pipelines from journal files / compiled; first frame | PREDICTED: most from the seed, few compiled, first frame before A
MEASURED:    from journal files: 1-99 (only the first-hit line) | compiled: 0 | first PresentX 137 s | not rendering by the limit: 4 submissions in all at t=150 s | PresentX ok 5
DIAG LINE:   device-fault: fault info on, checkpoints on, NVIDIA diagnostics config unavailable
END:         time limit (170 s); no device loss, no fault records
CACHES:      as A1 | RUN 1 of 4 for B
VERDICT:     journal part held (0 compiled); first frame missed (later than A1); title start slow in this boot

RUN p2599-B2

RUN p2599-B2 | 2026-11-29 UTC | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        59e65849b + #2599 (202ad50e5), local merge | gta6rt built from 0a325350e
MACHINE:     RTX 4070 Laptop 8 GB, laptop | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented (scripts/windows-boot/README.md, boot.ps1 defaults) + DEVIATIONS: -Seconds 210 | seed: as A1
OS/DRIVER:   defaults; boot.ps1-set LEONIDA_DEVICE_FAULT=2
TARGET:      compute pipelines from journal files / compiled; first frame | PREDICTED: most from the seed, few compiled, first frame before A
MEASURED:    from journal files: 1,201 | compiled: 12 | first PresentX 46 s | rendering from t=64 s, median 15.0 frames/s (29 windows, 0 under 5) | PresentX ok 2,247
DIAG LINE:   device-fault: fault info on, checkpoints on, NVIDIA diagnostics config unavailable
END:         time limit (220 s); no device loss, no fault records
CACHES:      as A1 | RUN 2 of 4 for B
VERDICT:     journal part held; first frame: same as A2/A3, not sooner

RUN p2599-A2

RUN p2599-A2 | 2026-11-29 UTC | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        59e65849b (boot.ps1 of main) | gta6rt built from 0a325350e
MACHINE:     RTX 4070 Laptop 8 GB, laptop | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented (scripts/windows-boot/README.md, boot.ps1 defaults) + DEVIATIONS: -Seconds 210 | seed: as A1
OS/DRIVER:   defaults; boot.ps1-set LEONIDA_DEVICE_FAULT=1
TARGET:      compute pipelines from journal files / compiled; first frame | PREDICTED: ~0 from the seed, all compiled
MEASURED:    from journal files: 31 (at 600 written) | compiled: 657 | first PresentX 27 s | rendering from t=62 s, median 2.9 frames/s (29 windows, 26 under 5) | PresentX ok 459
DIAG LINE:   device-fault: fault info on, checkpoints on, NVIDIA diagnostics config on
END:         time limit (220 s); no device loss, no fault records
CACHES:      as A1 | RUN 2 of 3 for A
VERDICT:     prediction held

RUN p2599-B3

RUN p2599-B3 | 2026-11-29 UTC | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        59e65849b + #2599 (202ad50e5), local merge | gta6rt built from 0a325350e
MACHINE:     RTX 4070 Laptop 8 GB, laptop | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented (scripts/windows-boot/README.md, boot.ps1 defaults) + DEVIATIONS: -Seconds 210 | seed: as A1
OS/DRIVER:   defaults; boot.ps1-set LEONIDA_DEVICE_FAULT=2
TARGET:      compute pipelines from journal files / compiled; first frame | PREDICTED: most from the seed, few compiled, first frame before A
MEASURED:    no compute pipeline looked up (no progress line) | compiled: 0 | no PresentX, no submission
DIAG LINE:   device-fault: fault info on, checkpoints on, NVIDIA diagnostics config unavailable
END:         process crash at 122 s: exit 0xc0000005, the runtime's unhandled-exception line; before the first submission; no device loss, no fault records
CACHES:      as A1 | RUN 3 of 4 for B
VERDICT:     no data on the target (crash before any journal lookup)

RUN p2599-A3

RUN p2599-A3 | 2026-11-29 UTC | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        59e65849b (boot.ps1 of main) | gta6rt built from 0a325350e
MACHINE:     RTX 4070 Laptop 8 GB, laptop | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented (scripts/windows-boot/README.md, boot.ps1 defaults) + DEVIATIONS: -Seconds 210 | seed: as A1
OS/DRIVER:   defaults; boot.ps1-set LEONIDA_DEVICE_FAULT=1
TARGET:      compute pipelines from journal files / compiled; first frame | PREDICTED: ~0 from the seed, all compiled
MEASURED:    from journal files: 31 (at 700 written) | compiled: 751 | first PresentX 35 s | rendering from t=58 s, median 11.7 frames/s (30 windows, 3 under 5) | PresentX ok 1,648
DIAG LINE:   device-fault: fault info on, checkpoints on, NVIDIA diagnostics config on
END:         time limit (216 s); no device loss, no fault records
CACHES:      as A1 | RUN 3 of 3 for A
VERDICT:     prediction held

RUN p2599-B4

RUN p2599-B4 | 2026-11-29 UTC | OreoFR | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        59e65849b + #2599 (202ad50e5), local merge | gta6rt built from 0a325350e
MACHINE:     RTX 4070 Laptop 8 GB, laptop | NVIDIA 621.40 | Windows 11 | 40 GB
RECIPE:      documented (scripts/windows-boot/README.md, boot.ps1 defaults) + DEVIATIONS: -Seconds 210 | seed: as A1
OS/DRIVER:   defaults; boot.ps1-set LEONIDA_DEVICE_FAULT=2
TARGET:      compute pipelines from journal files / compiled; first frame | PREDICTED: most from the seed, few compiled, first frame before A
MEASURED:    from journal files: 1,201 | compiled: 16 | first PresentX 63 s | rendering from t=82 s, median 9.8 frames/s (25 windows, 0 under 5) | PresentX ok 1,239
DIAG LINE:   device-fault: fault info on, checkpoints on, NVIDIA diagnostics config unavailable
END:         time limit (230 s); no device loss, no fault records
CACHES:      as A1 | RUN 4 of 4 for B
VERDICT:     journal part held; first frame not sooner than A

Verdict

The PR does what it says on NVIDIA. With a journal pre-compiled without the variable, main's boot.ps1
(LEONIDA_DEVICE_FAULT=1) read none of it: 102 / 657 / 751 compute pipelines compiled in A1-A3. The 5-31 "from
journal files" were re-reads of files the same boot had just written (the first one came after 37 and 55 writes). Under
=1 the key adds nv-diagnostics-config (READ IN CODE, d3d12_vulkan_device.cpp 11818-11824), so no seed name can
match. With the PR's default 2, the boots that got going read 1,201 from the seed. They compiled 0 / 12 / 16, which
fits pipelines bigger than my seed's cut at about 0.5 MB (ASSUMED, not checked name by name). Same result as Thib's
3090 table, on an 8 GB laptop card. Under 2, the device-fault line keeps fault info and checkpoints on, and the
diagnostics config shows as "unavailable", as the README row now explains.

The second half of my prediction missed: B did not reach its first frame sooner. Rendering started at t=58-127 s in A
and t=64-82 s in B (B1 had not started by 150 s). The time before the first frame is title start-up, and it varies a
lot from boot to boot. Most of A's compiles came after the first frame (A2: 100 written at 60 s, 600 at 180 s). That is
where B differs: in the 54 windows of B2 and B4 after rendering started, none was under 5 frames/s. A2 had 26 of 29
windows under 5 (median 2.9). A3 had 3 of 30 (median 11.7), close to B. So the frame rate after the first frame is a
hint, n=2 per arm, not settled.

B3 crashed at 122 s (access violation, the runtime's unhandled-exception line) before any submission and before any
compute pipeline was looked up. The device had been created, with the same line as the other B boots. Nothing on the
journal path or the GPU had run yet, so #2599 most likely did not cause it (ASSUMED, n=1 crash). B1 was also slow to
start. I am noting them as start-up variance seen in this session, not as an effect of the change.

Caches: each boot had its own fresh pipeline cache and journal folder. The NVIDIA driver's disk cache was not cleared.
It was warm for =1 pipelines from earlier sessions on this machine, and the pre-compile filled it for the seed's
pipelines. So A's compile cost may be understated, and the counts are the robust result here, not the timings.

python -I scripts/check_no_game_data.py on this file: exit 0, nothing found.

@timbot103 timbot103 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.

Static audit of 202ad50e5 only. No builds, tests, or GPU runs were performed for this review. I found no actionable defects.

  • scripts/windows-boot/boot.ps1 resolves the shell, -SetEnv, and trailing KEY=VALUE arguments in that order before selecting the Aftermath default. Explicit 0 and 1 survive, and a trailing empty assignment removes the variable from the launched process. The final LEONIDA_AFTERMATH=1 selects mode 1 only when device fault was left to the script default. The added PowerShell constructs are compatible with 5.1 and 7 on static inspection.
  • runtime/shims/d3d12_vulkan_device.cpp uses the same compute builder for precompile and boot. Mode 2 omits the NVIDIA diagnostics config from device creation and the journal key, matching the key for a compatible precompile run with device fault and Aftermath unset. runtime/src/pipeline_cache_journal.h checks the seed entry under that filename. Both modes request the same fault reporting, checkpoints, and optional AMD markers where supported. On AMD, Intel, or any other device that lacks NVIDIA's diagnostics config, the mode change has no effect on the enabled extensions or journal key.
  • scripts/windows-boot/README.md describes the new default and Aftermath exception. tests/test_windows_boot_journal_seed.py adds dry-run coverage for the defaults, override sources, removal, and Aftermath, plus a platform-independent README check. The test launcher prefers Windows PowerShell when both executables are installed. tests/test_docs_env_vars.py checks whether variable names are documented, and both names remain documented.

AI-assisted.

@MoonEyes
MoonEyes merged commit 931a8f7 into ProjectLeonida:main Nov 29, 2026
5 of 12 checks passed
@MoonEyes

Copy link
Copy Markdown
Collaborator

Merged after OreoFR's check (check: red/green on main + this PR) and a re-check here: no conflict with main 3431441, same head as checked, not frozen, no-game-data green.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

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.

5 participants