Before you start: words you need#
| Word | Plain meaning |
|---|---|
| NPU | Neural processing unit: a block on the SoC built only for neural-network maths, at low power. Apple calls its NPU the Neural Engine; Qualcomm calls its one Hexagon; Google’s is the Tensor TPU. |
| TOPS | Trillions of operations per second, usually 8-bit integer multiply-adds counted as two operations. A peak, not a speed you will see. |
| Scratchpad (SRAM) | Small, fast on-chip memory the NPU manages itself, instead of a cache. Qualcomm’s is called VTCM. |
| DMA | Direct memory access: a hardware engine that copies data between DRAM and the scratchpad while the compute units work. |
| Static graph | A model whose tensor shapes and operation order are fixed before it runs, so a compiler can plan every step. NPUs prefer them. |
| Heterogeneous execution | Splitting one model’s work across CPU, GPU and NPU on the same chip. |
| Copilot+ PC | Microsoft’s label for Windows laptops with an NPU of 40 TOPS or more. |
1. What is it?#
An NPU is an accelerator for the matrix and vector maths of neural networks, built into nearly every 2026 phone and laptop SoC. It gives up the generality of a GPU (no graphics, limited control flow, fewer data types, a compiler-scheduled programming model) in exchange for doing matrix work at a fraction of the power.
The main NPUs in 2026:
| Vendor | NPU | Devices (2026) | Peak (vendor figure) | Software |
|---|---|---|---|---|
| Qualcomm | Hexagon (scalar + HVX vector + HMX matrix units, VTCM scratchpad) | Snapdragon X2 Elite laptops; Snapdragon 8 Elite Gen 5 phones | 80 TOPS INT8 (X2 Elite; some SKUs listed at 85); phone NPU “37% faster” than the previous generation | QAIRT / QNN SDK, Genie, AI Hub; delegates in ExecuTorch, LiteRT, ONNX Runtime; llama.cpp Hexagon backend |
| Apple | Neural Engine | every A- and M-series chip; 32 cores on M5 Ultra and A20 Pro | 38 TOPS stated for M4; Apple no longer leads with a TOPS figure | Core AI, Core ML (Foundation Models runs on Apple’s stack) |
| Intel | NPU 4 (Lunar Lake), NPU 5 (Panther Lake, Core Ultra series 3) | Windows laptops | 48 TOPS (NPU 4); 50 TOPS (NPU 5), “180 platform TOPS” with CPU and GPU | OpenVINO and OpenVINO GenAI; ONNX Runtime OpenVINO provider |
| AMD | XDNA 2 (an array of AI Engine tiles, from Xilinx) | Ryzen AI 300 and 400 laptops; Ryzen AI Max+ 395 and Max 400 | 50 TOPS (Ryzen AI 300, Max+ 395); up to 60 TOPS (Ryzen AI 400) | Ryzen AI Software on ONNX Runtime GenAI (VitisAI provider); Lemonade server |
| Tensor TPU | Pixel 10 (Tensor G5), Pixel 11 (Tensor G6, August 2026) | Google claims G6 has 50% more TPU compute than G5 | AICore / Gemini Nano; LiteRT | |
| MediaTek, Samsung | APU, Exynos NPU | Android phones | vendor figures | NeuroPilot, Samsung SDKs; LiteRT and ExecuTorch delegates |
Facts checked on 13 November 2026. All TOPS figures are vendor claims, usually INT8 and sometimes with sparsity; they are not comparable across vendors without the fine print.
2. Why does it matter?#
- Energy. A phone or laptop cannot run a GPU at 20 W all day. An NPU does the same prefill or vision work at a few watts. Always-on features (live captions, background summaries, camera effects) are only possible on an NPU.
- Prefill. NPUs have many TOPS, and prefill is compute-bound (12.c). AMD’s hybrid design uses the NPU for prefill and the GPU for decode.
- Platform rules. Microsoft’s Copilot+ PC programme requires 40+ TOPS of NPU; Windows features such as Phi Silica run on it. OS vendors put their system models on the NPU first.
- Marketing pressure. “TOPS” is the headline number on every laptop box. An engineer must know what it does and does not predict.
3. Simple analogy#
A CPU is a craftsman who can make anything, one piece at a time. A GPU is a factory floor of thousands of workers who all do the same step at once. An NPU is a single specialised assembly line: set up in advance for one product (a compiled graph), it turns out that product with very little energy, but retooling it for a new product takes a planning step, and anything the line was not built for is sent back to the craftsman.
All three share the same loading dock (DRAM). However fast the line, it cannot receive parts faster than the dock delivers them.
4. Tiny example: 80 TOPS during decode#
A 3B model at 4 bits on a laptop with a 152 GB/s memory bus:
decode ceiling: 152 GB/s ÷ ~1.7 GB per token ≈ 90 tok/s at best
work per token: 2 × 3e9 operations = 6 GOP
at 90 tok/s: 6 GOP × 90 = 0.54 TOPS
NPU peak: 80 TOPS → under 1% in useDuring decode the NPU waits for memory almost all the time. Its TOPS matter for prefill: reading a 2,000-token prompt is 12 trillion operations, which an 80-TOPS NPU at 35% utilisation finishes in about 0.4 s, where 12 CPU cores might take 6 s.
5. Technical explanation#
What is inside an NPU#
The designs differ, but they share a pattern:
- Matrix engine. A systolic array or matrix unit for INT8, INT4/INT16 and FP16 (newer parts add FP8 or block FP formats). Qualcomm’s HMX, Apple’s Neural Engine cores, AMD’s AI Engine tiles.
- Vector engine. Wide SIMD for activations, normalisation, softmax, quantize/dequantize. Qualcomm’s HVX is 1024 bits wide. Transformer layers lean on it more than older CNNs did; a Qualcomm Hot Chips 2023 slide illustrated a transformer split of roughly 70% HVX and 30% HMX work.
- Scratchpad and DMA. Megabytes of SRAM that software manages explicitly, filled by DMA engines. The compiler tiles each operation so weights and activations stream through the scratchpad, overlapping transfer and compute (the same idea as tiling through shared memory on a GPU, 4.d, but planned entirely ahead of time).
- A control processor. A small scalar core (Hexagon’s is a VLIW core) that sequences the graph.
The programming model: compiled, static graphs#
You do not write kernels for most NPUs. A vendor compiler takes a whole graph and produces a binary:
- Graph capture from ONNX, a
.pte, a.tfliteor a Core AI asset (29.d). - Quantization to the formats the NPU supports, often with per-channel or per-block scales the compiler requires (29.f). Many NPUs want symmetric INT4 or INT8 weights and 8- or 16-bit activations.
- Tiling and scheduling for the scratchpad, fixed for the given shapes.
- A binary per chip generation (Qualcomm “context binaries”, Intel blobs, AMD xclbins, Apple’s compiled models). Qualcomm’s newer SDKs can emit one artifact for several Snapdragon chips.
Consequences for LLMs:
- Static shapes. A decode graph has one token; a prefill graph has a fixed chunk (for example 128
tokens). Longer prompts run several chunks; shorter ones are padded. The KV cache is a fixed-size
buffer. Intel’s OpenVINO GenAI NPU pipeline exposes this directly:
MAX_PROMPT_LEN(default 1,024 tokens) andMIN_RESPONSE_LENset the compiled sizes, and longer prompts trigger chunked prefill automatically. - Operator coverage. A new attention variant, a new activation or a dynamic-shape operation may not compile. Then the graph is split and the unsupported part runs on the CPU, with the hand-off costs shown in 29.d.
- Compile time. Compiling a 3B LLM for an NPU can take minutes; ship precompiled artifacts or cache the first compilation.
import openvino_genai as ov_genai
pipeline_config = {"MAX_PROMPT_LEN": 1024, "MIN_RESPONSE_LEN": 512}
pipe = ov_genai.LLMPipeline("qwen3-4b-int4-ov", "NPU", pipeline_config)
print(pipe.generate("Summarise: ...", max_new_tokens=128))Vendor by vendor#
- Qualcomm Hexagon. The best-supported NPU for LLMs on Android and Windows on Arm. The stack is
QAIRT (the Qualcomm AI Runtime SDK, with the QNN/“AI Engine Direct” APIs), Genie for LLM pipelines
(a
genie-t2t-runtool and C APIs), and AI Hub, which compiles and profiles models on real devices in the cloud. ExecuTorch, LiteRT and ONNX Runtime (QNN execution provider) all delegate to it, and llama.cpp has a Hexagon backend that builds HTP kernels for several Hexagon generations (v73, v75 and later). - Apple Neural Engine. Reached only through Apple’s frameworks. Apple’s 2022 guide to deploying
transformers on it recommends a channels-first
(B, C, 1, S)layout, 1×1 convolutions in place of linear layers, and chunked attention: the ANE is fastest when the model is shaped for it. Since M5 and A19, the GPU’s Neural Accelerators take much of LLM prefill (29.c); the Neural Engine remains the low-power engine, and Core AI chooses between them. - Intel NPU. OpenVINO compiles for it; OpenVINO 2026 releases (2026.4.1, October 2026) expanded NPU LLM support. Panther Lake’s NPU 5 is one of three engines Intel counts towards “180 platform TOPS”; in practice the Xe3 iGPU often decodes faster, and the NPU is the efficient choice for sustained, smaller models.
- AMD XDNA 2. A 2D array of AI Engine tiles, each with its own vector processor and local memory, fed by memory tiles: a spatial dataflow design inherited from Xilinx Versal. AMD’s LLM flow is explicitly hybrid: the NPU runs prefill and the iGPU runs decode, on ONNX Runtime GenAI.
- Google Tensor. The TPU in Pixel phones runs Gemini Nano through AICore; app developers reach it through ML Kit and LiteRT rather than directly.
Reading a TOPS number#
Before comparing two NPUs, ask:
- Which precision? INT8 is standard; some vendors quote INT4 (double) or sparse (double again).
- Peak or sustained? A phone NPU cannot hold its peak clock for long.
- What bandwidth feeds it? The NPU shares the SoC’s memory bus with CPU and GPU (29.a). Decode speed is set by that bus, not by TOPS.
- What runs on it? TOPS are worthless for operators the compiler cannot place.
- At what power? The point of an NPU is TOPS per watt.
6. Under the hood: three engines on one chip#
This program compares CPU, iGPU and NPU on a laptop-class SoC for a 3B model: prefill time for a 2,000-token prompt, decode speed, how many TOPS decode really uses, and energy. Peak TOPS resemble 2026 laptop parts; utilisation, bandwidth share and power are assumptions to show the shape of the trade-off, not measurements.
// npu.go — the same SoC, three engines: prefill time, decode speed and energy.
// Peak figures resemble a 2026 laptop SoC; utilisation and power are assumptions.
package main
import "fmt"
type engine struct {
name string
peakTOPS float64 // INT8 (or INT8-equivalent) peak
util float64 // fraction of peak reached on prefill matmuls (assumed)
bwShare float64 // fraction of DRAM bandwidth it can pull during decode (assumed)
watts float64 // power while busy (assumed)
}
func main() {
const (
params = 3e9 // 3B dense model
bytesTok = 1.7e9 // 4-bit weights + small KV read per decoded token
dramGBs = 152e9 // shared LPDDR5X bus (all engines use the same one)
prompt = 2000.0 // prompt tokens
)
engines := []engine{
{"CPU (12 cores)", 4, 0.5, 0.7, 25},
{"iGPU", 40, 0.4, 0.85, 20},
{"NPU", 80, 0.35, 0.6, 6},
}
fmt.Println("engine prefill 2k decode TOPS used J/token prefill J")
fmt.Println(" (seconds) (tok/s) in decode (decode)")
for _, e := range engines {
prefill := 2 * params * prompt / (e.peakTOPS * 1e12 * e.util)
decode := dramGBs * e.bwShare / bytesTok
used := 2 * params * decode / 1e12
fmt.Printf("%-16s %8.2f s %8.0f %10.2f (%.1f%%) %7.2f %9.1f\n",
e.name, prefill, decode, used, 100*used/e.peakTOPS, e.watts/decode, e.watts*prefill)
}
}Output:
engine prefill 2k decode TOPS used J/token prefill J
(seconds) (tok/s) in decode (decode)
CPU (12 cores) 6.00 s 63 0.38 (9.4%) 0.40 150.0
iGPU 0.75 s 76 0.46 (1.1%) 0.26 15.0
NPU 0.43 s 54 0.32 (0.4%) 0.11 2.6How to read it:
- Decode speeds are close for all three, because they share one memory bus. The NPU may even be slower if its DMA path cannot pull the full bandwidth. None of them uses more than a few per cent of its TOPS while decoding.
- Prefill is where TOPS pay: 14x faster than the CPU on the NPU, and 58x less energy.
- Energy per token favours the NPU by 2–4x even at similar speed. On a battery, that is the reason to use it.
- AMD’s hybrid split (NPU prefill, GPU decode) is the obvious reading of this table: give each phase to the engine that is best at it. The cost is two compiled graphs and a KV cache that both must read.
7. Performance implications#
- A vendor data point. Google reports Gemma 4 E2B on LiteRT-LM at 133 prefill and 7.6 decode tokens per second on a Raspberry Pi 5 CPU, and 3,700 prefill and 31 decode on the NPU of a Qualcomm Dragonwing IQ8 board: the NPU multiplies prefill by about 28x and decode by about 4x (the IQ8 also has far more memory bandwidth than the Pi).
- Use the NPU for compute-bound and always-on work: prefill, vision encoders (26.b), speech recognition (26.e), embeddings, small classifiers.
- Do not expect the NPU to speed up decode of a model that is bandwidth-bound; expect it to make decode cheaper in energy, if the whole graph fits on it.
- Chunk sizes are a knob. Larger prefill chunks use the NPU better but pad more on short prompts; compile two or three variants.
- Long contexts strain static KV buffers. A compiled KV cache of a fixed maximum length costs memory whether used or not; some stacks compile several context-length variants.
- Thermals. The NPU’s low power is also what lets the device sustain its speed; a GPU path that is faster for one minute may be slower over ten.
8. Production implications#
- Treat each NPU family as a separate target with its own export, compiler version, numeric checks and device lab. Budget engineering time per family.
- Use vendor model zoos as a starting point. Qualcomm AI Hub, Intel’s OpenVINO model hub and AMD’s Ryzen AI model collections ship pre-quantized, pre-compiled LLMs that are known to work on their NPUs; customised architectures are where the work starts.
- Gate the NPU path at runtime: check the driver version, NPU presence and a numerical self-test, and fall back to GPU or CPU on failure.
- Expect quantization constraints that differ from the GPU path (symmetric weights, 16-bit activations, per-channel scales), and evaluate quality per backend (28.d).
- Driver updates are deployments. An OS or driver update can change NPU performance or numerics across your whole user base overnight. Monitor field metrics by driver version.
9. Common mistakes#
- Comparing TOPS across vendors without precision, sparsity and sustained clocks.
- Expecting TOPS to raise tokens per second on a bandwidth-bound decode.
- Leaving one operator per layer on the CPU and losing the NPU’s advantage to hand-offs (29.d).
- Compiling on the user’s device at first launch and adding minutes to onboarding.
- Assuming a model compiled for one Snapdragon generation runs on the next.
- Ignoring power. The NPU’s advantage is energy; a benchmark that measures only speed misses it.
10. Hands-on exercise#
- Run
npu.go. Double the NPU’sbwShareto 1.0. Does it now beat the iGPU on decode? What hardware change would that need? - Change the prompt to 200 tokens and to 20,000 tokens. At which length does the CPU’s prefill time become unacceptable for a chat app (say 2 s)?
- Model AMD’s hybrid split: NPU prefill plus iGPU decode for a 2,000-token prompt and a 300-token answer. Compare total time and energy with NPU-only and iGPU-only.
- On a Copilot+ PC or an Intel Core Ultra laptop, run the same small model through OpenVINO GenAI on
"CPU","GPU"and"NPU". Record time to first token, decode speed and, if you can, package power. - Upload a small model to Qualcomm AI Hub (or use its sample models) and read the per-layer profile. Which operators ran outside the NPU?
11. Interview questions#
- What is inside a typical NPU, and how does its programming model differ from a GPU’s?
- Why does an 80-TOPS NPU barely change decode speed for a 3B model, and what does it improve?
- Why do NPUs need static shapes, and how do LLM runtimes cope with variable prompt lengths?
- Explain AMD’s NPU-prefill, GPU-decode split. What does it cost?
- A laptop vendor claims “180 platform TOPS”. What questions do you ask before believing it helps your LLM feature?
12. Further reading#
Checked on 13 November 2026.
- Qualcomm Hexagon NPU and Snapdragon X2 Elite
- ML Inference at the Edge (Qualcomm, Hot Chips 2023 tutorial)
- llama.cpp Snapdragon (Hexagon) backend
- OpenVINO GenAI on NPU
- Hybrid NPU/iGPU optimized agent on AMD Ryzen AI (AMD, 2025)
- Deploying Transformers on the Apple Neural Engine (Apple, 2022)
- Windows ML supported execution providers
- NITRO: LLM inference on Intel laptop NPUs (arXiv 2412.11053)