Repository navigation
inkling2 metal: one threadgroup-size attribute per convolution kernel, so the runtime library loads - #5303
Merged
Conversation
This was referenced Nov 27, 2026
…, so the runtime library loads #4593 gave tf_ink2_stage_conv, tf_ink2_stage_conv_segs, tf_ink2_stage_conv_static and tf_ink2_commit_histories two copies of [[max_total_threads_per_threadgroup(256)]]. Current Metal compilers refuse a repeated attribute, so the whole runtime library failed to load (LibraryLoad) and Inkling 2 Mini could not start on Metal. The host test now refuses a doubled header for every runtime kernel.
…tion kernel, so the runtime library loads
ashhart
force-pushed
the
lead/inkling2-conv-attr-once
branch
from
November 27, 2026 10:19
9894d33 to
82dbf9b
Compare
This was referenced Nov 27, 2026
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.
Main cannot start Inkling 2 Mini on Metal since #4593: four kernels in
zig/kernels/metal/inkling2/runtime_conv.metal(tf_ink2_stage_conv,tf_ink2_stage_conv_segs,tf_ink2_stage_conv_static,tf_ink2_commit_histories) carry[[max_total_threads_per_threadgroup(256)]]twice. The Metal compiler refuses a repeated attribute, so the whole runtime library fails:This PR removes the second copy on each of the four kernels (no other shader change) and adds a host check in
runtime_kernels_test.zigthat refuses a doubled header on any runtime kernel, so this is caught without a GPU.Checks:
zig build test-inkling2-metal-hoston an M3 Ultra: fails on main's shader with the error above, passes with this change.Seen first on an M5 Ultra overnight exactness run (the server refused to load the checkpoint).
Synthena