Skip to content

pr-set : repin #385 and #386 for the Inkling 2 compute buffer reserve, and #251, #378, #396, #401 for review fixes - #422

Merged
danielhanchen merged 2 commits into
masterfrom
pinset-inkling2-rsv
Nov 23, 2026
Merged

danielhanchen merged 2 commits into
masterfrom
pinset-inkling2-rsv

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Repins #385 and #386 to their fix for the Inkling 2 compute buffer growing past the size reserved at load, and repins #251, #378, #386, #396 and #401 for their review fixes.

pin old new change
#385 (Inkling 2 attention chunking) 54dcc05 4aae13c chunk height sized per cache size in whole 64-row tiles, never smaller for a longer ubatch; the chunks write into one output
#386 (Inkling 2 banded attention) 06322ff 210fc26 the #385 change merged in; a ubatch of several sequences takes the dense path; the dense F16 bias is a ggml_cast instead of a copy into a graph leaf; the graph reserved at load also covers the dense cases one sequence still takes
#378 (Inkling 1) cf37396 68df508 the meta backend reads the banded rel_logits split from src[6]; Inkling mmproj loads without v.patch_embd.weight; test-flash-attn-bias fails on non-finite output; banded attention does not delegate to MMA when flash attention is compiled out (#386 carries the same four fixes)
#396 (looped layer offload) 9b6b8a4 bff7247 comment only
#401 (clip rows fusion) e418bb2 6c0e84d the matcher keeps the ops separate when a chain node is in place or the limit is the weighted input, with two new CLIP_ROWS_FUSE cases
#251 (MoE cache auto) 038adc6 79629e9 comment only

All are fast-forwards of the pinned commits. Each fix is described on its own PR. The cause and the full tables are in the two PR descriptions.

Why

The graph reserved at load took the banded path, while several runtime cases still build the dense relative bias (several sequences in a unified cache, ubatches of 32 tokens or less, the SWA layers once the SWA cache wraps). The dense bias was also copied into a graph leaf, which the allocator keeps for the whole graph, so #385's chunking did not bound memory. The buffer then grew at runtime, up to an OOM in the middle of a generation.

CUDA0 compute buffer, reserved at load / largest at runtime, MiB (B200, Inkling-2-Mini UD-IQ1_S):

context, KV ubatch slots before after
131072, f16 2048 1 3151 / 13121 3795 / 3795
131072, f16 2048 2, -kvu 3151 / 121155 8273 / 8273
524288, q4_0 128 2, -kvu 494 / 32891 6181 / 6181
524288, q4_0 2048 2, -kvu 4273 / OOM 26705 / 26705

One slot at f16 reserves a little more at load: +56 / +223 MiB at 32768 and +175 / +643 MiB at 131072 (-ub 512 / -ub 2048).

Output is unchanged (PPL strings equal to the current pins at -c 512 and -c 4096, mean KLD 0, single and multi-sequence). Runtime graphs have the same node count as before; the extra reserve nodes exist only in the graph built at load.

Checks

result
sim b12631, b12635, b12641 43 pins merge; pin_contract all intact; merge_checks clean
verify b12635 --cuda CUDA build and test-chat pass; test-backend-ops MUL_MAT 2897, MUL_MAT_ID 1183, PAD 37, GET_ROWS 361; feature_matrix --gpu 31/31 (CLIP_ROWS_FUSE 20/20 before the last #401 commit, 21/21 with it)
test-backend-ops -o FLASH_ATTN_EXT_BANDED 71/71 on CUDA0
test-llama-archs inkling2 and inkling2_loop pass

Not covered: ROCm, Vulkan, Metal and Windows (the change is in the model graph, not a backend), and timing beyond a llama-bench sanity check (pp512 and tg128 within noise).

@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-23T07:46:57.814510Z a1fc16b 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.

@danielhanchen danielhanchen changed the title pr-set : repin #385 and #386 so the Inkling 2 compute buffer reserve covers the dense relative bias pr-set : repin #385 and #386 for the Inkling 2 compute buffer reserve, and #251, #378, #396, #401 for review fixes Nov 23, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: a1fc16b0fd

ℹ️ 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 ff43f5e into master Nov 23, 2026
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