Skip to content

knowledge(coreml): ANE CPU-scheduled matmul research lead - #76

Merged
Alex-Wengg merged 2 commits into
mainfrom
knowledge/ane-cpu-scheduled-matmul
Jul 16, 2026
Merged

knowledge(coreml): ANE CPU-scheduled matmul research lead#76
Alex-Wengg merged 2 commits into
mainfrom
knowledge/ane-cpu-scheduled-matmul

Conversation

@Alex-Wengg

@Alex-Wengg Alex-Wengg commented Jul 16, 2026

Copy link
Copy Markdown
Member

What

Adds knowledge/coreml/ane-cpu-scheduled-matmul.md capturing a research lead relevant to mobius's ANE-targeting mission, plus an index bullet in knowledge/coreml/AGENTS.md.

Source

A reviewer comment on the Surgical Inference draft (M. Mireles), left by the author of the ds4-ssd repo, responding to the paper's "reverse engineering the ANE" section. The claims:

  • Private ANE matmul op, CPU-scheduled, no Core ML recompile — dispatch matmuls to the ANE outside the compile → .mlmodelcpredict cycle ("ANE as a BLAS backend").
  • int8 weight transfers to cut bytes streamed on bandwidth-bound stages.
  • ~20 TOPS on M4; claims to beat the M3 Ultra GPU on LLM prefill (author's own numbers).

Why it matters here

Sharpens two positions in our existing ANE notes, and — if it holds — reopens a direction we currently write off:

  1. "LLMs don't benefit from the ANE" is a decode-phase claim (bandwidth-bound). Prefill is compute-bound and may benefit.
  2. Bandwidth-bound stages have an untested lever: int8 transfer, independent of compute unit.
  3. On-device LLM on the ANE. A split-phase LLM — prefill on ANE (off the GPU), decode bandwidth-bound elsewhere — would fit the same decompose-and-place logic mobius already applies to STT/TTS, and keep the GPU free for a co-resident assistant. Would motivate a future llm model class. Kept conditional on verification.

Status

Explicitly recorded as unverified — a lead to investigate, not confirmed guidance, and not a committed scope change. The note includes a verification checklist (locate the API surface via ds4-ssd, reproduce the M4 prefill number with coreml-cli, measure int8 vs FP16 transfer, confirm iOS availability/OS fragility) and links to the vendored neural-engine/ reverse-engineering docs.

No code or model changes.

Records an unverified third-party claim (reviewer comment on the Surgical
Inference draft, from the ds4-ssd repo author): a private ANE matmul op
schedulable directly from the CPU with no Core ML recompile, int8 weight
transfers for bandwidth-bound stages, and the prefill/decode distinction
that makes 'LLMs don't benefit from the ANE' a decode-only claim.

Framed as a lead to investigate, not confirmed guidance; includes a
verification checklist and links to existing neural-engine notes.
Adds an 'If proven right' section making the payoff explicit: the
prefill/decode split would let LLM prefill (compute-bound) run on the
ANE off the GPU while decode stays bandwidth-bound elsewhere, reopening
on-device LLM inference and a potential future 'llm' model class.
Kept conditional on the existing verification checklist.
@Alex-Wengg
Alex-Wengg merged commit d2398af into main Jul 16, 2026
@Alex-Wengg
Alex-Wengg deleted the knowledge/ane-cpu-scheduled-matmul branch July 16, 2026 23:22
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.

1 participant