Skip to content

Inkling-2-Small: Add embeddings, router, and other glue kernels - #4126

Merged
ashhart merged 2 commits into
ashhart:mainfrom
ajensenwaud:ink-k-ops
Nov 21, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
ajensenwaud:ink-k-ops

Conversation

@ajensenwaud

@ajensenwaud ajensenwaud commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

Adds Inkling 2's embedding, block residual mix, short convolutions, router, soft-capped SwiGLU and pick kernels, their launcher, and their registration with the kernel contract. Nothing serves them until the family PR at the top of the stack.

Checks on this head

  • Head df021e51b; 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,926 of 11,018 tests, 91 skipped (main's cuda_disk_test failed once, then passed three reruns) on main c94e65d33; rebased onto f0d5ddb74, rechecked there: the CUDA tests compile and the family host tests pass; test-gradient-serving passes with kernels.zig re-pinned.
  • zig fmt --check build.zig zig and git diff --check: clean. CI: pending.

Receipt

n/a: no served path reaches these kernels yet.

Kernel contract
  • Registered: the 13 kernels in ops.cu and 2 in rows.cu, one registration per served site.
  • Planted controls: 13, each red as planted.
  • GB10 (sm_121), the family's run on this stack tested over main 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 29 registrations and 13 controls.
  • Main's full kernel-contract on 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.
  • Gate 5: records for nvcc 13.0 and 13.3 on sm_80, 86, 89, 120 and 121; 13.2 stays pending.

@AIFlowML

AIFlowML commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

@ajensenwaud @ashhart I checked df021e51 with Zig 0.17.0. The first detail I'd add to the receipt is the smaller rerun command, with its own count on this head. On M5 Max, zig build test-inkling2-cuda-host test-gradient-serving -Dcpu=apple_m1 --summary all passed all 11 tests. On Linux x86-64 the same targets with compile-cuda-tests -Dfixed-cpu passed 18 build steps and all 11 tests.

My test merge into 1ece6e6db conflicted in the changelog and the zig/src/cuda/kernels.zig checksum row. In a disposable tree, I used main's changelog for the test and regenerated the checksum (9c79fd774fb7b31a216f8d1b0697c6a177a2a454480cf58e9a140c75fadbe5a9). Both focused targets passed again. Device execution of the glue kernels remains outside these checks.

Rechecked after the rebase at 0e592aaed. The trial merge into 37fa51d23 was clean. On that tree, Zig 0.17.0 on M5 Max passed all 11 host tests with zig build test-inkling2-cuda-host test-gradient-serving -Dcpu=apple_m1 -Doptimize=ReleaseSafe -j3 --summary all, including the regenerated checksum fixture.

Igor Lessio - AIFLOW LABS

ashhart added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 20, 2026
ashhart added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 20, 2026
ashhart added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 20, 2026
@ajensenwaud

Copy link
Copy Markdown
Contributor Author

Thanks, Ash. #4126 to #4128 still carry the copy of #4125 from before the merge, so they conflict with main. I have them rebased onto 46c6ee229 with the code unchanged, and can push that unless you're already on it.

ashhart added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 21, 2026
ashhart added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 21, 2026
ashhart added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 21, 2026
@ajensenwaud ajensenwaud changed the title Inkling 2's glue kernels under the kernel contract Inkling-2-Small: Add embeddings, router, and other glue kernels Nov 21, 2026
@ashhart
ashhart merged commit 5016061 into ashhart:main Nov 21, 2026
2 of 10 checks passed
@ashhart

ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Thank you @ajensenwaud. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

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.

3 participants