Skip to content

CUDA on GB10: count the checkpoint's cached pages as room instead of dropping them - #4427

Merged
ashhart merged 5 commits into
mainfrom
lead/gb10-budget-cached
Nov 22, 2026
Merged

ashhart merged 5 commits into
mainfrom
lead/gb10-budget-cached

Conversation

@ashhart

@ashhart ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner

What this changes

#3192 (on main, left out of 1.3.3) set a GB10's start-up budget to min(MemAvailable + parked, CUDA free) - reserve and dropped the checkpoint's shards from the page cache before the load, so a just-read checkpoint was not refused for its own cached pages (#1857). On a GB10 with Flash Next NVFP4 it then refused --parallel 8 at a 73,728-token window that 1.3.2 serves (budget 18.14 GiB against 19.94 needed, 19.60 on another box), and the first cold 32K prompt after start was 5.4% slower.

This keeps #1857 fixed without either regression:

  • The budget is min(MemAvailable + parked, CUDA free + checkpoint_bytes) - reserve, where checkpoint_bytes is the rank's own weight bytes, which family_memory.weights already computes. The checkpoint's clean cached pages are counted back as room instead of being dropped, so the answer no longer depends on what the page cache holds at that instant.
  • The pre-load page drop is removed, so the first prompt does not fault the weights back in.
  • Discrete cards, Windows, Metal and HIP are unchanged; pool/poolFor keep their old behaviour for every other caller.

Checks on this head

  • test-cuda-host and test-cuda-startup-costs-host pass, with a new regression test for a just-read 60 GiB checkpoint and one that the 1.3.2 configuration keeps its budget.
  • fmt, ast-check and the lean check are clean; changed code files are at or under 600 lines.

Not run yet

  • On a GB10 with Flash Next NVFP4: --parallel 8 at a 73,728-token window starts, and the cold 32K prompt matches 1.3.2. This PR stays out of the landing queue until both hold.

CUDA free alone no longer caps the unified host pool: clean pages cached by a just-read checkpoint count as room. Update the parked-share and GB10 fixture expectations to poolFor's arithmetic; leave the supplied engine commits unchanged.
@ashhart
ashhart force-pushed the lead/gb10-budget-cached branch from 8e83ad0 to 9e1ec0a Compare November 22, 2026 06:45
@ashhart
ashhart merged commit 311749c into main Nov 22, 2026
12 of 23 checks passed
@ashhart
ashhart deleted the lead/gb10-budget-cached branch November 22, 2026 07:16
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.
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.

1 participant