upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/test_run_gpu_tests_python_assembler.py
diff options
context:
space:
mode:
authorNotRexed <therealnothingfn@gmail.com>2026-11-27 16:30:28 -0500
committerNotRexed <therealnothingfn@gmail.com>2026-11-27 16:30:28 -0500
commit8cc5193ec10f56861c0b92d6d0c66bc9bc8c1c86 (patch)
treeb4f7f60a85f6e6b168566bcb3d290a4dac567457 /tests/test_run_gpu_tests_python_assembler.py
parent956a1fc94e2f0d4ff4feab3b0bba2750aca8b37d (diff)
Dynamic descriptor slots: a draw that finds none can wait for the next landing without the submission lock (LEONIDA_DYNAMIC_WAIT=1; off by default)
What it is about: a table made afresh, a root SRV and a root UAV take dynamic slots of the view heap (`State::tables`, `root_srv_table`, `root_uav`). When none is free the recording thread settled everything in the air (`settle_for_fence`) and asked again. The slots come back flight by flight, when the thread that lands flights is done with one (`Detached::release_tables`), and that thread never takes the submission lock; the settle waits for all of them and keeps that lock meanwhile, so the submitting thread stands at it with submissions ready. What changes: the three places go through `host::wait_for_slots`. Without the switch it does what they did (settle, ask again), and counts. With LEONIDA_DYNAMIC_WAIT=1 and the relay on, the thread first waits for landings without the lock, asking again after each (`take_after_landings`), until it has its slots or nothing is in the air and nothing is being landed (no slot can come back that way then); only then the settle as before. A frame-rate line says, when any draw found no slot: how many per frame, the time they waited, how many had their slots after a landing, how many settled, how many went without. Off by default, and for a reason: nothing here has run in the game, and whether a draw of this title finds no slot at all with the launcher's 524,288 dynamic slots is not known. The line says it ("dynamic descriptor slots: per frame ... draws found none"); if it never appears the switch has nothing to do. A diagnostics build turns it on and off while the title runs (LEONIDA_AB=<seconds>,LEONIDA_DYNAMIC_WAIT). What it is aimed at: the submitting thread's wait for the submission lock in frames where slots run out (not a line of the CPU profile of 2026-11-27, which shows running time; the frame-rate lines' "waiting for the submission lock" and the new line are the ones to read). From fxceless/victory-fork 52dfd12 ("Ray-tracing fixes and a lock stall fix; README says where ray tracing is"), GPL-3.0: `wait_for_slots`, `dynamic_wait` and the line, as there. Measured there on a GeForce RTX 4070 at 9,000 to 11,000 draws: 0.64 settles a frame of 19.7 ms each, frames with one 92.7 ms against 68.1 ms. Not as in the source: the asking is a function of its own that a test can call; the lowest count of free slots is not kept (two shared counters written at every table made, on eight threads); and f299fba's later parts (translation paused while slots are short, slots given back at the start of a landing, `=alt`) are not here. New test `host::dynamic_wait_tests`: the asking stops with its slots, asks again after each landing and no more, looks at the air before it asks, and stops when the air was empty at an asking that found none. Checked: `cargo check --profile diag -p leonida --features diagnostics,mimalloc` and without `diagnostics` (the 10 and 18 warnings of leonida-gpu from before); the test passes. Not run in the game. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_run_gpu_tests_python_assembler.py')
0 files changed, 0 insertions, 0 deletions