Support SmolLM shape tensors in CoreML - #223
Open
matthargett wants to merge 23 commits into
Open
Conversation
…mklimenko/onnx2webnn-fixes
…nko/onnx2webnn-fixes
16 tasks
Retain option-operand tracking and tensor identity validation from main, preserve shape and integer condition lowering, and resolve local lint failures.
Preserve the resample2d and CANN changes from main alongside shape import and integer-mask lowering. Check native MIL shape types and exact integer readback and select results on CoreML.
This was referenced Sep 13, 2026
mtavenrath
approved these changes
Sep 13, 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.
Summary
shapenodes to MILshapeunsqueezenodeswhereconditions to uniquely named MIL bool valuesshape -> unsqueeze(int64 and uint32 readback) and zero/nonzero integer masksThis completes the first three items in #222. The SmolLM compiler pass now reaches the dynamic
attention_maskinput-signature mismatch tracked there.Validation
make fmt-check,make lint, and strict Clippy withcoreml-runtime,dynamic-inputspasscoreml-runtime; 371 withcoreml-runtime,dynamic-inputs; all pass04cd4a830e26add75d385f28d95a080600b5d70f: 2,460 passed, 41 expected skips, 20 existing negative-index scatter failures. Results match a clean main control case-for-casemake docs-backend-ops-checkpassesshapeand duplicate MIL values toModel input 'attention_mask' has a different shape than its corresponding parameter to main.The public builder/interchange shape dtype remains int64; the uint32 test uses an explicit cast. This does not implement #225's proposed dynamic-shape API. A reduced ranged
shape -> unsqueezeprobe still reproduces the input-signature mismatch tracked in #222; the passing numerical tests use fixed dimensions and repeated CPU-only predictions.