Skip to content

Inkling 2: a visit's BF16 input projections in one launch (1/5, split from #405) - #414

Merged
AzeezIsh merged 1 commit into
Atlas-Inf:mainfrom
Enntity:inkling2/split-405-1-proj
Nov 25, 2026
Merged

AzeezIsh merged 1 commit into
Atlas-Inf:mainfrom
Enntity:inkling2/split-405-1-proj

Conversation

@data-angel

Copy link
Copy Markdown
Contributor

Change 1 of 5 split from #405, as asked there: one change per PR, stacked linearly on main (7a717b659). This PR
is one commit; the four after it are each based on this one's branch.

What

With BF16 projections (Strict), a visit's input projections (q, k, v, relative bias, gate, sinks, dynamic conv
taps: six to eight small GEMVs) run as one inkling2_proj_gemv launch over a per-visit device table. Each output
row is computed by the chain dense_gemv_bf16_batchm computes, so its body now takes the block index (the entry
passes blockIdx.x). inkling2_proj_gemv joins the PDL list in pdl_inkling2.rs.

Outside the Inkling files: kernels/gb10/common/dense_gemv_bf16_batchm.cu (the block index argument). As you noted
on #405, strix-hip's copy of that file carries the AMD 64-bit warp-mask branch; I have not touched
kernels/strix-hip.

Observed on one GB10, plain Strict decode, greedy text and concurrency hashes identical to the unfused build:
C1 35.9 -> 36.4 tok/s, aggregate C8 115-118 -> 118-120 (measured on #405's old base).

No GPU run on this rebased branch; the GPU observations above were made on #405's old base.

Test plan

  • Greedy text of three probe prompts and concurrency hashes identical to the unfused build (GB10, old base)
  • pdl_tests.rs with the new kernel; check_kernel_shadows.py OK
  • On this branch (Rust 1.93.1, CUDA stubs, no GPU): cargo fmt --all -- --check, cargo clippy --workspace --tests, the file-size cap script, spark-model inkling2 tests (11 passed)
  • spark benchmark run <gate> --pull-request-gate gates and the strix-hip build: left to the maintainers

Authorship

AI-authored: Claude (Opus 5.5 and Fable 5.2) in Claude Code, directed and reviewed by a human; no hand-written code.

CLA

  • I have read and agree to the Contributor License Agreement.

🤖 Generated with Claude Code

q, k, v, the relative-bias and gate projections, the sinks and the
dynamic convs' taps ran as six to eight GEMV launches a visit, each small
(24 to 3,072 outputs over K = 2,304). inkling2_proj_gemv runs them as one:
each segment of a per-visit device table (written once the shared buffers
attach, one a row count up to 8) is one projection's input rows, weight
and output, and every output row is the chain dense_gemv_bf16_batchm
computes for it (the common body now takes its block index). A visit with
a quantized projection (Spark weights) keeps one launch each.

Observed on one GB10, plain Strict decode (no drafter), saver size,
greedy text and the six-prompt concurrency hashes identical to engine
d1b138e: C1 code/prose 35.84/35.87 -> 36.37/36.37 tok/s (server rate,
3 runs), aggregate C2 51-53 -> 52-55, C4 79-80 -> 80-82, C8 115-118 ->
118-120 (2 rounds of 2 runs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh

Copy link
Copy Markdown
Contributor

Queued in train #421 (integ/train-inkling-20261125), merged --no-ff in stack order. GB10 gate is running on sparky (job 187); results will be posted on #421.

🤖 Generated with Claude Code

AzeezIsh added a commit that referenced this pull request Nov 25, 2026
…ute.rs, code moves only)

#408, #412 and #414 each grew glue.rs; merged it is 505 lines and the
file-size-cap job fails. The router top-k and the KV page write move as is
to a second impl block in glue/route.rs (446 + 74 lines).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh
AzeezIsh merged commit 57cddb5 into Atlas-Inf:main Nov 25, 2026
1 check passed
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.

2 participants