Repository navigation
[pr-fix] Sends: a submission's memory past what is kept is made at its own size (a 4 GiB upload buffer refused at world load) - #8
Open
HQasper wants to merge 1 commit into
Conversation
A submission's own memory for what it sends up (VICTORY_SEND_OWN) was made at the next power of two of what it sends. At world load one submission sends 1 GB to just past 2 GiB, so it asked for 4 GiB: one upload buffer of 4096 MiB or more is refused on an RTX 5090 with 0x8007000E (4095 MiB is made), with memory to spare. In 13 of 27 runs of the opening it was asked for and refused; all spare buffers were then let go for a second try, and the submission sent from the CPU sides. Memory past what is kept as spares (kept()) is never kept, so it is now made at its own size, in 64 KiB steps. Below that it doubles as before. Tests: a_send_past_what_is_kept_is_made_at_its_own_size, and the ignored upload_sizes_this_card_makes, which lists the single upload buffers the card makes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HQasper
marked this pull request as ready for review
November 30, 2026 05:08
HQasper
pushed a commit
that referenced
this pull request
Nov 30, 2026
…r#3706) A device removal after 100 s to 3.5 min with hardware ray tracing (RTX 4070 Ti SUPER, DRED: none of our lists' commands). Plausible causes removed, no switch (correctness and safety): - Indices: every build and refit copies the title's indices on the card (clamp_ib), a triangle naming a vertex at or past VertexCount becomes 0,0,0. Before, an IB the CPU could not read went unchecked and refits trusted a max-index cache by address. Refits key the topology on the title's IB, not the host copy. A geometry that cannot be given is now an inactive one in its place (NaN vertices / NaN box), so GeometryIndex stays the title's; before it was left out (idea from mrvdkpro/VIctory-NativeRT). - Positions: float32 vertex buffers copied on the card (copy_vb) and the quant24 decode: not finite or |v| > 1e10 becomes NaN (inactive triangle); the copies are made readable by a transition before the builds (idea from mrvdkpro/VIctory-NativeRT). - Scratch and instances: one shared scratch buffer and one instance buffer served every list. Now each BLAS wave, TLAS build and instance remap has a piece of its own (LeasePool), given back only when the list that used it is reset after its last execution (HostList::hold). A TLAS keeps the BLAS buffers its remap table named until its next build or its drop, then retires them, so a BLAS rebuilt elsewhere or evicted is never freed under a TLAS still in use (idea from akimfomin/VIctory-NVIDIA-Lab issue #8 (TuxBox trustno1-coder#455)). New line every 5 s 'hardware RT inputs: ...'. CPU tests: position and triangle rules, the HLSL compiles and follows them, lease pool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVi6XmTj4ohPL7QwUeFgV4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it changes
A submission's own memory for what it sends up (
VICTORY_SEND_OWN,host/send.rs) was made at the next power of two of what it sends, so that the next submission of about that size finds it as a spare.At world load one submission sends from 1 GB to just past 2 GiB. The double of that is 4 GiB, and one upload buffer of 4096 MiB or more is refused on an RTX 5090 with
0x8007000E, with memory to spare (4095 MiB is made). The refusal then:make_or_free_and_retrywithfree_all_spares), which also fails;no upload buffer ... size=4294967296;VICTORY_SEND_OWN=0.Memory past what is kept as spares (
kept(), 768 MiB on a large host) is never kept:give_backdrops it at once. So it is now made at its own size, in 64 KiB steps. Below that it doubles as before.What is in it:
host/send.rs(made_size, used bymemory), and two tests in the same file.How it was found
Benchmark runs of the opening from one save (RTX 5090, ray tracing on, DLSS Quality) logged
no upload buffer error=... (0x8007000E) size=4294967296about 40 s into the run in 13 of 27 runs. The process had 30 GB committed of the PC's 70 GiB, and 7 of 46 GB of the card's shared memory in use.A local probe (a backtrace for every CPU-visible buffer of 1 GiB or more) named the caller:
send::take→Host::upload_buffer_maybe_wb→Host::upload_buffer_own. In two runs it asked for 1, 2 and 1 GiB, and for 4, 1 and 1 GiB; the 4 GiB one was refused.How it was tested
a_send_past_what_is_kept_is_made_at_its_own_size: sizes below and above what is kept, a small host's limit, and that a send just past 2 GiB is made under 4 GiB.upload_sizes_this_card_makes(cargo test -p victory-gpu --release --lib -- --ignored upload_sizes_this_card_makes --nocapture), on the RTX 5090 with nothing else running: 1024, 2048, 3072, 4032 and 4095 MiB are made; 4096, 4097 and 5120 MiB are refused with0x8007000E.host::sendtests: 4 passed, 2 ignored.no upload bufferin 20 runs (0 of 8 with ray tracing).size=4294967296.Checked for overlap
send.rs,VICTORY_SEND_OWNandno upload buffer(2026-11-30): perf(gpu): SEH AVX2 word_diff_copy, scoped WC-burst send::take, and fused copy_spans/refresh_front trustno1-coder/VIctory-NVIDIA#3395, RTX 5060 Ti: heap writes in pieces, Reflex's sleep off the submitting thread, send spares kept under pressure, launcher folding first trustno1-coder/VIctory-NVIDIA#3411, host, send, uav_pool: trim only unborrowed low-water spare pools at 1 Hz sweep trustno1-coder/VIctory-NVIDIA#3381, [pr-perf] Eliminate per-submission allocation churn and O(N^2) grouping in card_before, card_record, and send::take trustno1-coder/VIctory-NVIDIA#2587, gpu(send): use AVX2 non-temporal streaming stores for writeback uploads trustno1-coder/VIctory-NVIDIA#2811 and perf(host): overlap send upload copies with sync/check D3D12 recording in card_before trustno1-coder/VIctory-NVIDIA#1403 changesend.rs, none of them this rounding. The issues v2026.11.29.02: 0x8007000E upload allocation failure and dropped draws on RTX 5090 trustno1-coder/VIctory-NVIDIA#3024 (RTX 5090) and Shaders touch uncopied title memory pages (read 0/dropped), 4 GiB upload buffer OOM, and out-of-order prelude texture upload (RTX 5080) trustno1-coder/VIctory-NVIDIA#2945 (RTX 5080) report the same refusal.Written with Claude Code (Claude Opus 5.5); measured on my PC; reviewed by me.
🤖 Generated with Claude Code