Repository navigation
CUDA on GB10: the memory budget is at most CUDA's free memory, after the checkpoint's cached pages are dropped - #3192
Merged
Merged
Conversation
ashhart
force-pushed
the
lead/gb10-admission-card-free
branch
from
November 18, 2026 00:05
2ced8a1 to
a306bef
Compare
ashhart
added a commit
that referenced
this pull request
Nov 18, 2026
ashhart
force-pushed
the
lead/gb10-admission-card-free
branch
from
November 19, 2026 04:42
a306bef to
0662546
Compare
ashhart
added a commit
that referenced
this pull request
Nov 19, 2026
… checkpoint leaves the page cache On a GB10 the memory admission read /proc/meminfo alone. MemAvailable counts the page cache, which CUDA can't allocate until the kernel reclaims it: after one 60 GB checkpoint read CUDA reported 60.17 GiB free against MemAvailable's 115.85 GiB, and admission granted 103.44 GiB, 43.27 GiB above CUDA's figure (#1857). Both admission readers, poolFor and readPool (the Qwen3 embedding and reranker engine, the speech engine's limit), now take the smaller of the host figure and CUDA's free (cuda_memory.boundFree), less the same reserve. The parked share is the part of that free above MemAvailable, so its debug line stays true. Before the weights check, the CUDA open on an integrated device advises POSIX_FADV_DONTNEED on the shards core's loader opens (checkpoint.shardFiles: the weight map's files inside the model folder, else model*.safetensors) through checkpoint_cache.drop, so a checkpoint just downloaded or read is not refused for its own cached pages. Only clean cached pages go; no file's bytes change, and an index naming a file outside the folder drops nothing. After the load no second drop runs: each loader's own release (#1884) has dropped its load-only pages already and keeps the ranges it reads at run time, such as Flash Next's n-gram rows. Discrete cards and Windows keep their counts (boundFree passes them through and the drop never runs off an integrated Linux device); Metal and HIP don't reach this code. Admission sizes streams and caches only, so replies keep their tokens. The docs' unified-memory budget says the same. Host tests replay the 6 Nov figures; a GB10 device check is owed.
ashhart
force-pushed
the
lead/gb10-admission-card-free
branch
from
November 21, 2026 06:19
0662546 to
6ffb177
Compare
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
to Bizuayeu/TensorFold
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
to Bizuayeu/TensorFold
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
to Ch0mpaa/TensorFold
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
to Ch0mpaa/TensorFold
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
#3192 caps a GB10's start-up budget at CUDA's reported free memory and drops the checkpoint's shards from the page cache before the load. On a GB10 with Flash Next NVFP4, 1.3.3 then refuses --parallel 8 at a 73,728-token window (needs 19.94 GiB, budget 18.14 GiB) that 1.3.2 serves, and its first cold 32K prompt is 5.4% slower. It stays on main for a fix.
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
that referenced
this pull request
Nov 21, 2026
ashhart
added a commit
that referenced
this pull request
Nov 22, 2026
Unreleased: the five (#N) placeholders get their PR numbers, the two (#PR) duplicates go, #3192's line goes (#4427 replaced that behaviour on main and its line refs #3192), #3960 is named as the PR that landed #2799, and the penalty under --instruct-sampling card; ?token= Web addresses and pull's digest and size checks). Sixteen PRs merged 20-21 Nov with no line anywhere: a blank lines file replaced each PR's own line at landing. #4321 and #4322 go under Unreleased, the twelve that shipped in 1.3.3 under 1.3.3, and the two 1.3.1 lines that carried no PR number get #3941 and #4022. docs/environment.md: Flash Next checks 37 settings, and TF_GLM_INDEX_SPLIT (registered by #4510) gets its row.
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.
On a GB10 (unified memory, Linux), the CUDA start-up budget came from
/proc/meminfoalone.MemAvailablecounts the page cache, and CUDA can't allocate those pages until the kernel reclaims them. After one 60 GB checkpoint read, CUDA reported 60.17 GiB free andMemAvailablewas 115.85 GiB. Admission granted 103.44 GiB, 43.27 GiB more than CUDA's free figure.What changes on unified Linux
MemAvailableplus the per-CPU free pages) and the free memory CUDA reports, then subtract the same reserve as before (a tenth of RAM, at least 4 GiB, orTENSORFOLD_MEMORY_RESERVE_GIB). The second reader serves the Qwen3 embedding and reranker engine and the speech engine.POSIX_FADV_DONTNEEDon the checkpoint's own shards: the files its weight map names inside the model folder, ormodel*.safetensorswhen there's no index. Without this, a checkpoint that was just downloaded or read could be refused because of its own cached pages. Only clean cached pages are dropped; no file's bytes change. An index naming a file outside the folder drops nothing, and other files and the rest of the page cache are left alone. The advice goes through the same path as the existing post-load release, so it waits while a tensor-parallel load is in flight.What stays the same
Tests (host, no GPU)
MemAvailable115.85 GiB, CUDA 60.17 GiB free, the 12.41 GiB reserve that the 103.44 GiB grant implies. The pool's free is now CUDA's 60.17 GiB and its room is 47.76 GiB./procis never read.Still owed: a GB10 device check. It should reproduce the cached state (read a checkpoint's shards, then serve) and confirm that the budget stays at or below CUDA's free less the reserve, and that the page cache drops by about the checkpoint's size before the load. After a fresh boot, the budget should be compared with main's. It should also confirm that greedy
token_sha256equals main's and compare load time.Part of #1857. Thanks to @mimeding for the 19-job series and the pre-launch release-and-check approach that this follows.