Skip to content
C.W.K.
Stream
Lesson 05 of 06 · published

Fixed-Function Blocks: Neural Engine, Media Engine, Secure Enclave

~15 min · cpu-soc, neural-engine, media-engine, secure-enclave, core-ml, device-tree

Level 0Spec-Sheet Skimmer
0 XP0/91 lessons0/19 achievements
0/100 XP to next level100 XP to go0% complete
"A fixed-function block does one job at a tenth of the power. The price is that it does one job."

Why a Phone Chip Is Full of Specialists

A general-purpose core can do anything, slowly and expensively. A block built for one job — decode a video stream, run a convolution, hold a key — does that job at a fraction of the energy, and a phone that has to play video for hours or unlock in a blink cannot afford the general core's price. So the A-series filled its die with specialists, and the M-series inherited every one of them. Three matter for this quest.

The Neural Engine

Every M3 tier ships a 16-core Neural Engine; the M3 Ultra lists 32 cores because it is two dies. It is reached through Core ML — you compile a model into Core ML's format, ask for the Neural Engine as a compute unit, and the framework decides what actually runs there. Apple's own on-device language model is the flagship tenant: the 2024 Foundation Models report describes "a ~3 billion parameter on-device language model" with "efficient Key-Value (KV) cache update on our neural engines". Apple's transformer-on-ANE research goes back to 2022.

And yet almost no language-model runtime on the Mac uses it. The honest reason is in Apple's own Core ML article on running Llama 3.1: such models are "usually constrained by memory bandwidth", so the article targets the GPU. A bandwidth-bound decode gains nothing from a faster fixed-function multiplier, and the runtimes that dominate — MLX, llama.cpp, PyTorch — want programmable kernels, dynamic shapes and a cache that grows, which Metal gives them and the Neural Engine's compiled-graph model does not. Which compute unit runs Apple's own on-device model on a given device is not documented. In this household the one app that reaches the Neural Engine at all does so indirectly: an on-device speech-to-text engine built on Core ML, chosen for its power profile, not for language modelling.

The Media Engine

Hardware H.264, HEVC and ProRes encode and decode, plus AV1 decode, on every M3 tier; the Max has two encode engines and two ProRes engines, and the Ultra has four of each and two decoders — again, two dies. This is the block that makes a fanless laptop edit video, and it is the block the household's media pipeline leans on when a worker transcodes a library. It is also the cleanest demonstration of the SoC as a set of specialists: run a transcode and the CPU barely moves.

The Secure Enclave

A separate processor with its own memory and a boot chain of its own, holding the keys that unlock the disk and authenticate the owner. It is why FileVault on Apple silicon costs nothing perceptible and why a stolen logic board is a brick. For this quest its role is small but exact: it is the one part of the SoC whose isolation is the whole point, on a die whose defining feature is the removal of a boundary.

Count Them Yourself

macOS's device tree names every instance. The code block reads it over ssh on three M3 Macs. The Air reports ane, avd, ave — one each, no index. The M3 Max reports ane0, avd0, ave0, ave1. The M3 Ultra reports ane0 ane1, avd0 avd1, ave0 ave1 ave2 ave3. That is Apple's spec table — 16/32-core Neural Engine, one or two decoders, one, two or four encoders — read back from the hardware, and it is the die count of track one made visible to the operating system.

Code

fixed_function.py — count the specialists the device tree exposes, per Mac·python
#!/usr/bin/env python3
"""Neural Engine (ane), video decoders (avd) and encoders (ave) as macOS names
them in the device tree. Base chips name a single instance without an index."""
import re
import subprocess
import sys

ALIASES = sys.argv[1:] or ["air", "pro2023", "office"]
REMOTE = "ioreg -rc AppleARMIODevice | grep -oE '\"name\" = <\"[^\"]*\">'"

for alias in ALIASES:
    out = subprocess.run(["ssh", alias, REMOTE], capture_output=True, text=True).stdout
    names = set(re.findall(r'"name" = <"([^"]*)">', out))
    blocks = sorted(n for n in names if re.fullmatch(r"(ane|avd|ave)\d*", n))
    counts = {k: sum(1 for n in blocks if n.startswith(k)) for k in ("ane", "avd", "ave")}
    print(f"{alias:8} {' '.join(blocks):40}  neural engines {counts['ane']}  decoders {counts['avd']}  encoders {counts['ave']}")

# 2026-09-15, macOS 26.6.2:
# air      ane ave avd                    neural engines 1  decoders 1  encoders 1
# pro2023  ane0 avd0 ave0 ave1            neural engines 1  decoders 1  encoders 2
# office   ane0 ane1 avd0 avd1 ave0-3     neural engines 2  decoders 2  encoders 4
The drivers behind the nodes, and Apple's spec sheet for comparison·bash
ioreg -l | grep -oE '"IOClass" = "[A-Za-z0-9]*(ANE|AVE|AVD|ProRes|SEP)[A-Za-z0-9]*"' | sort -u
# "AppleAVD"  "AppleAVE2Driver"  "AppleProResHW"  "AppleSEPManager"  "H11ANEIn" ...   <- office

# Apple's tech-specs page for Mac Studio (2025), M3 Ultra:
#   32-core Neural Engine · Two video decode engines · Four video encode engines
#   Four ProRes encode and decode engines · AV1 decode
# MacBook Pro (Nov 2023), M3 Max 16C/40G:
#   16-core Neural Engine · Video decode engine · Two video encode engines
#   Two ProRes encode and decode engines · AV1 decode

External links

Exercise

Run fixed_function.py against your Mac (pass your ssh alias, or run the ioreg line locally) and add the three counts to your card beside your chip's spec-sheet numbers. Then take one workload you actually run — a video export, a photo tag, a dictation — and say which block, if any, it lands on, and how you would confirm that from Activity Monitor or powermetrics rather than from a spec sheet.
Hint
Activity Monitor's GPU History and a transcode that leaves the CPU idle is the media engine; sudo powermetrics --samplers ane_power during a Core ML model is the Neural Engine. If neither moves and the CPU is busy, your workload found no specialist and paid the general price.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.