Skip to content

Cap Studio paging reserve on Windows integrated CUDA GPUs - #19081

Merged
danielhanchen merged 2 commits into
mainfrom
fix/windows-cuda-igpu-paged-fit
Nov 23, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
fix/windows-cuda-igpu-paged-fit

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

When Studio switches an oversized load to mmap on a Windows integrated GPU, the paging path from #16857 can add 15 GiB to llama.cpp's fit reserve. With the default 1 GiB base reserve and 18 GiB free to CUDA, only 2 GiB remains for placement. This explains the CPU-heavy Inkling-2-Mini load in the RTX Spark N1X report. #18448 addressed the equivalent Vulkan case.

Change

Cap the extra paging reserve at 10% of the estimated free CUDA budget for a single Windows integrated CUDA GPU whose device index Studio can match. Use the same calculation on the initial launch and the architecture retry. Studio still uses mmap for oversized loads and honors an explicit --fit-target.

Validation

I ran the bundled ARM64 llama-server (b12631) on an RTX Spark N1X with Inkling-2-Mini UD-Q4_K_XL at 8K context. I simulated an 18 GiB free budget in the fitter because this laptop reports about 45 GiB free to CUDA.

Effective reserve Layers reported on CUDA Model weights on CUDA
Current 16 GiB 1 of 25 0.46 GiB
Proposed cap, 2.8 GiB 25 of 25 12.9 GiB
Manual --fit-target 1024 25 of 25 14.9 GiB

Some expert weights stayed on CPU with both lower reserves. A chat request with the manual override returned the expected answer at about 19 tokens/s.

The new placement tests cover the CUDA cap, a different device, and a Vulkan index collision. I ran the test cases against the extracted placement helpers and compiled both changed Python files. The full Studio suite is left to CI.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T14:40:35.029895Z f2562b7 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: f2562b7ea0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 169e442 into main Nov 23, 2026
@danielhanchen
danielhanchen deleted the fix/windows-cuda-igpu-paged-fit branch November 23, 2026 14:41
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