Repository navigation
Inkling 2's attention kernels under the kernel contract - #4125
Open
ajensenwaud wants to merge 1 commit into
Open
ajensenwaud wants to merge 1 commit into
ajensenwaud wants to merge 1 commit into
Conversation
ajensenwaud
force-pushed
the
ink-k-attn
branch
from
November 20, 2026 08:25
934aa3d to
e5525d4
Compare
ajensenwaud
force-pushed
the
ink-k-attn
branch
from
November 20, 2026 08:26
e5525d4 to
0e053ba
Compare
This branch has not been deployed
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.
What this changes
Adds Inkling 2's attention kernels, with a relative-position bias, a sink and a sigmoid gate on every head, their launcher in a new
inkling2module, and their registration with the kernel contract. Nothing serves them until the family PR at the top of the stack.cfc8510ce.atc overlap --json: incomplete (ATC's limits). Conflicts only in shared append lists (CHANGELOG.md, the CUDA build and kernel lists, contract joins and limits), with CUDA: #1764's BF16 prompt tile for Qwen ModelOpt, Nemotron and Dory, plus two exact Qwen prompt kernels (#1762) #2008, Unlimited-OCR-2 on CUDA: the family's steps on NVIDIA GPUs (sm_89 and up) #2077, moss image: serve pictures on CUDA (encoder, decoder and host for #1573) #2281, lanes: LFM3's row draw and Flash Next's host reference draw use core's sampling_row (#2460 item 3, step 2) #2679 and server: --vision-image-share fixed gives every image the same share of the visual-token budget (#2510) #2717.Checks on this head
0e053ba11; lean checker 168 on the base, 168 on this head, 0 new.zig build test test-golden test-inkling2-cuda-host compile-cuda-tests: 10,925 of 11,016 tests, 91 skipped on mainc94e65d33; rebased ontocfc8510ce, rechecked there: the CUDA tests compile and the family host tests pass.zig fmt --check build.zig zigandgit diff --check: clean. CI: pending.Receipt
n/a: no served path reaches these kernels yet.
Kernel contract
tf_ink2_prep(sliding and full),tf_ink2_rel_table,tf_ink2_attnandtf_ink2_attn_foldwithtf_ink2_merge, andtf_ink2_attn_prompt, which replaces fold and merge bit for bit. They use common'sqmm_fragmma and ldmatrix andtf_commoncp.async; nvcc 13.3 gives the same SASS as with local copies on sm_80, 86, 89, 120 and 121.4fda6a020, 19 November, with the same family and contract files:SUMMARY 55 kernels: 55 pass gates 1-4, 0 fail, 0 known findings; 35 controls: 35 red as planted, 0 missed; 0 limit problems, exit 0. This PR's share is 7 registrations and 5 controls.kernel-contracton that head and on main alone: 388 limit problems and 8 known findings on both, and no failure on the head that main does not show.