Repository navigation
Inkling-2-Mini: Add loop message and gate kernels - #4746
ajensenwaud wants to merge 2 commits into
Conversation
c97a672 to
2663f2c
Compare
|
Thanks @ajensenwaud for the loop kernels and the thorough contract coverage. One small cleanup: the loop kernel set's init marks its module loaded and then appends registrations without a cleanup on error, and the caller does not clean up the loop set either, so an allocation failure leaves the module loaded. Please add the matching cleanup, as the attention set does.
|
|
OK, will do. Thanks, @ashhart. |
|
Done in |
8b46062 to
de88559
Compare
|
I tested zig build test-inkling2-cuda-host test-inkling2-host test-gradient-serving check-native-cuda-host -Dfixed-cpu -j2 --summary all
zig build compile-cuda-tests -Dtarget=aarch64-linux-gnu -Dfixed-cpu -j2 --summary allOn M5 Max, 90 host tests passed with four skips. The native adapter and full CUDA contract runner both cross-compiled for ARM64 Linux. I also confirmed the loop set and its caller retain the requested cleanup after the rebase. The current-tree GPU rerun remains open, including the same-filter main comparison for the reported GLM and launch-limit findings. Igor Lessio - AIFLOW LABS |
|
Thanks @ajensenwaud. The loop set now cleans up if registration fails, its parent owns the cleanup, and the analogous ops fix is present. That closes the requested ownership issue. This looks ready to land after our metadata and limit-table integration. The earlier contract failures remain recorded with their baseline scope; this cleanup does not need another unchanged arithmetic run.
|
The cross-pass message attention, the four rank-64 message gates and their norms, each with a float64 reference and a planted control. Their nvcc 13.0 records keep 13.2 pending, with the 13.3 receipt beside them.
Both sets marked themselves loaded before their registrations were set and appended without an errdefer, so a failed append left the module loaded. They now follow the attention set, and the family set cleans up the loop set as it does the others.
|
@ajensenwaud, a correction to our note above: provenance also has to be settled before this can land, and we should have said so. This PR's notice says Could you say how these kernels were written:
We've rebased the branch onto today's main either way, so nothing is lost while this is sorted out.
|
|
Thanks, Ash. The answer is closer to the second.
The notice already names the file and its Apache-2.0 licence. If the Mini plan needs these kernels written from the published maths alone, I can do that rewrite. Alternatively, #5059 can move onto main's loop kernels and this PR can close. |
Inkling 2 Mini runs layers 6 to 17 three times, and from the second pass on each of those layers mixes in a message
from the pass before. TensorFold has no CUDA kernels for that step with the fixed sum order a batch-invariant engine
needs. This PR adds them.
What this changes
Adds the loop step's kernels, their launcher and their contract registrations: the cross-pass message attention,
the four rank-64 message gates and their norms. A row gives the same bits in any window or prompt chunk. Nothing
serves them yet.
68ff0ad8e.is
loop_ops.zigso that it does not collide with Inkling 2 Mini on CUDA and Metal #4387'sloop.zig.Checks on this head
de885595d; lean checker 165 on the base, 165 on this head, 0 new.zig buildover 19 host steps, Inkling 2's andtest-cuda-hostamong them,-Dfixed-cpu: 547 of 547 steps, 9,413 of 9,451 tests, 38 skipped.zig fmt --check build.zig zig,git diff --check,test-kernel-symbols-host,cuda_common_check.pyandcuda_fragment_check.py: clean.Receipt
n/a: no served path reaches these kernels yet.
Kernel contract
loop.cu, each with a float64 reference written from transformers'Inkling2LoopMessageGateandInkling2LoopMessageAttentionResidual, and a planted control after each group.kernel-contract inkling2 exl3 vit actgivesSUMMARY 146 kernels: 144 pass gates 1-4, 2 fail, 0 known findings; 103 controls: 103 red as planted, 0 missed; 27 limit problems. Main under the same words gives the same two failures, both in GLM's wide-expert tests, and the same 27 limit problems.