diff options
| author | NotRexed <therealnothingfn@gmail.com> | 2026-11-28 17:43:35 -0500 |
|---|---|---|
| committer | NotRexed <therealnothingfn@gmail.com> | 2026-11-28 17:43:35 -0500 |
| commit | 0a2c75d842a54e73f83969e77020cc9545f5efb4 (patch) | |
| tree | adb91fb721c18d781e795aa4f8449f64503f9554 /runtime/test/code_hooks_test.cpp | |
| parent | bed7b1d223273be92012bf67efbd2733fee9b985 (diff) | |
GPU: upload and shared buffers of up to 4 MiB placed in blocks made once, given back after their submissions (LEONIDA_SMALL_BUFFER_POOL=1)
After trustno1-coder/VIctory-NVIDIA 95509b9 (GPL-3.0), which cut upload
and shared buffers of up to 4 MiB from pooled 64 MiB heaps. Each such
buffer was a committed resource of its own: an allocation, MakeResident
and Map, and for a shared one a wait on a queue of ours until the card
has the new memory, on the threads that translate the title's lists
(1.6 ms an upload buffer, 2.9 ms a shared one while walking).
Now one of up to 4 MiB (all but 0.3 a second of 110 while walking) is a placed
resource in a 64 MiB heap of its kind (crate::pool::small, cut by
crate::pool's Pool): an upload heap, or the custom write-back L0 heap of
Host::shared_buffer, each made resident and waited for once. A buffer is
one placement and one Map, in the state its own would have started in,
zeroed by the CPU when its piece was used before. Its piece comes back
when the device destroys the buffer (an object of ours it holds, as for
textures in blocks), through crate::host::retire: only once every
submission begun or queued by then has run, and bury_lag after it, and
from inside the device's release only into a queue of its own that the
pool takes at its next use. Empty blocks kept: 2 of each kind, 1 under
memory pressure, 0 and no new block when commit is critical (then a
buffer is its own, as before). Off by default; LEONIDA_AB can name it.
The memory line says the blocks and what buffers hold of them; the
census counts the buffers by the line that asked, the blocks apart.
Measured (RTX 4060 Ti 16 GB, driver 32.0.16.1664, Ryzen 5 7600X, 32 GB;
Series X 1440p from waterside-1125, frame generation off):
- buffers made, walking a whole run each way: with it 59.3 upload
buffers a second in 10.0 ms (58.8 from blocks, 0.11 ms each) and 46.4
shared in 4.5 ms (0.09 ms each); without it 63.1 in 101.7 ms and 46.7
in 136.0 ms: 238 -> 14.5 ms a second of the list threads' time;
- the frame, A/B of 4 s phases walking and turning, three runs of 46
pairs: means -0.77 (+-2.24), -1.75 (+-1.63), -1.68 (+-2.01) ms, together
-1.5 (+-1.1); medians -0.85 (+-2.06), -1.47 (+-1.67), -2.10 (+-1.85),
together -1.5 (+-1.1); p90s together -1.1 (+-1.9); of 80 to 84 ms;
- standing, A/B of 4 s phases with a level for each view (74 phases):
medians -0.66 (+-0.48), means -0.46 (+-0.51) of 70 ms; pairs +0.02
(+-0.77);
- memory, a whole walking run each way (memory lines every 5 s): private
30,506 against 30,866 MB on average (31,399 and 32,158 at the end),
left to commit 1,963 against 1,792 MB, the PC's memory shared with the
card 4,575 against 4,657 MB in use; at the end 448 MB of upload blocks
(330 held by buffers) and 1,024 MB of shared ones (907 held).
No device removed and no new kind of warning in seven runs.
Tests: small_buffers_take_whole_64_kib_up_to_the_bound,
small_pieces_come_back_through_their_queue_and_are_used_again,
small_buffers_are_placed_in_blocks_and_used_again_on_the_card (on the
card: zeros, a copy from a placed upload buffer into a placed shared one
past another buffer of its block, the same pieces placed again).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/code_hooks_test.cpp')
0 files changed, 0 insertions, 0 deletions