NPU Architecture for On-Device AI Explained
A neural processing unit (NPU) is a processor designed to accelerate neural-network operations with relatively low power, making it useful for on-device AI in laptops, phones, cameras, and other edge systems. An NPU is not a miniature GPU that automatically runs every model faster: its benefit depends on the model, supported operations, memory movement, device software, and the rest of the application. This explainer follows an AI model from application to hardware and shows how to evaluate an NPU in a real deployment.
Why NPUs Are Being Discussed
AI features increasingly run where data is created: speech transcription on a laptop, image enhancement on a phone, or object detection in a camera. Processing locally can reduce network round trips, keep some inputs on the device, and avoid sending every request to a remote service. It also makes an application less dependent on connectivity, although it does not by itself guarantee privacy or lower total cost.
Many current processors combine a CPU, GPU, and NPU in one system-on-chip. Operating systems and inference runtimes can direct supported neural-network operations to the NPU while leaving other work on the CPU or GPU. Microsoft’s Windows ML overview, for example, describes a common runtime interface that can use hardware-specific execution providers for local inference. The NPU is therefore part of a broader software and memory system, not a feature that applications can use just by detecting a chip.
What Is an NPU?
An NPU is a specialized processor for common neural-network computations, especially the multiply-accumulate operations used in matrix multiplication and convolution. These operations apply weights to input values to produce intermediate values, or activations. An NPU performs many of them in parallel using hardware and data types selected for inference workloads.
The name describes a class of processors, not one shared design. One NPU may emphasize matrix engines and local scratchpad memory; another may combine vector processors, dedicated data paths, and a compiler that schedules operations across several blocks. Vendors differ in instruction sets, supported precision, memory organization, drivers, and model tooling. There is no single NPU programming interface or model format that guarantees the same performance across devices.
A distinction between model format and execution backend helps clarify the software stack. ONNX is an open model representation that can help move a model between frameworks and runtimes. ONNX Runtime execution providers connect that runtime to particular hardware libraries. A model file does not contain a universal NPU program; the target runtime still has to compile or map its operations to a compatible backend.
The Problem NPUs Solve
CPUs are flexible, but a general-purpose core is not always an efficient way to perform a large number of similar matrix operations. GPUs offer high parallel throughput, but can use more power than a small device can dedicate to sustained inference, and moving data to a discrete GPU can add overhead. NPUs target a middle ground: accelerate supported neural-network work while sharing the power, cooling, and memory limits of a device.
This is especially relevant for repeated, relatively predictable inference tasks such as filtering audio or classifying camera frames. A dedicated accelerator can perform those operations without requiring the CPU to do every calculation or waking a larger GPU for each request. The practical advantage is not simply peak arithmetic speed; it is useful model throughput within an energy and thermal budget.
How NPU Inference Works
A typical inference path looks like this:
Input → application preprocessing → model graph → runtime and compiler → execution provider and driver → NPU compute and memory → output processing
The application loads a model, prepares input tensors, and asks an inference runtime to execute it. The runtime checks the graph against the accelerator backend’s supported operators, shapes, and data types. A compiler may transform and optimize compatible parts of the graph, then the driver submits work to the NPU. Results return to the application for post-processing.
The graph may not run entirely on the NPU. An execution provider can claim supported graph regions, while unsupported operations run on a CPU or another backend. This fallback preserves compatibility, but transitions between devices can require synchronization and data copies. Too many small partitions can cost more than the accelerated operations save. The ONNX Runtime portability guide explains why a registered provider does not prove that every model operation uses it.
The data path matters as much as the compute blocks. A laptop or phone NPU commonly draws from system memory rather than a separate high-bandwidth memory stack. Input tensors, model weights, activations, and intermediate buffers all compete for memory capacity and bandwidth with the operating system and other processors. Frequent CPU–NPU transfers can erase gains, so runtimes may keep data in shared buffers or fuse operations where possible. This differs from accelerator memory systems such as high-bandwidth memory (HBM), which are designed for high aggregate bandwidth near large accelerators.
| Feature | CPU | GPU | NPU |
|---|---|---|---|
| Main strength | Flexible control flow and broad software support | High parallel throughput across many workloads | Efficient execution of supported neural-network operations |
| Typical work | Application logic, preprocessing, small or irregular tasks | Graphics, large parallel workloads, and supported AI models | Repeated inference graphs on supported data types |
| Software path | Operating system and general-purpose libraries | Graphics or compute runtime and device libraries | Vendor driver, compiler, and inference execution provider |
| Memory considerations | General system memory and caches | Device memory or shared memory; transfers may matter | Often shared system memory on client devices; locality still matters |
| Common constraint | Limited parallel throughput for large tensor workloads | Power, thermal limits, startup, and data-transfer overhead | Operator and precision coverage, runtime availability, and graph partitioning |
| Good evaluation metric | End-to-end latency for the task | Throughput and latency at realistic batch sizes | Sustained task latency and energy with verified NPU placement |
These are broad tendencies, not guarantees. A GPU integrated into a mobile processor may share memory and power limits with an NPU. A small or irregular model may run better on the CPU. Measure the actual device and application rather than choosing a processor by its name.
NPU Components and Design Choices
- Compute arrays: Matrix engines, vector units, or other specialized blocks execute supported operations in parallel. Their shape and scheduling are vendor-specific.
- Local storage and data reuse: Registers, caches, or scratchpad memory hold weights and activations close to compute units. Reusing data locally can reduce trips to system memory, but it does not remove the need to fit the model and intermediate tensors in available memory.
- Numerical precision: NPUs may accelerate selected integer or floating-point formats. Quantizing a model can reduce storage and data movement, but changes numerical results and is useful only when the runtime and hardware support its operators and precision.
- Compiler and runtime: The compiler maps a graph to the hardware’s supported operations; the runtime manages model loading, buffers, execution, and sometimes CPU fallback. A good model format alone does not supply these components.
- Driver and power management: The driver controls access to the device, while the platform shares power and thermal budgets among the NPU, CPU, and GPU. Sustained performance may differ from a short peak benchmark.
Peak throughput is often advertised in operations per second, including trillions of operations per second (TOPS). TOPS is a theoretical rate under a stated precision and counting convention; multiply-accumulate operations may be counted differently, and sparse-operation assumptions can change the headline. It says little by itself about whether a particular model fits, how many of its operations the backend supports, or how long end-to-end inference takes.
The W3C’s Web Neural Network API specification provides a useful software-layer example: it defines a hardware-agnostic web interface for building and dispatching neural-network graphs, not a common NPU chip or a guarantee about which device executes each operation. Standards and model formats can make interfaces more consistent while device-specific implementation and performance still vary.
Real-World NPU Uses
Voice and audio features can apply noise suppression, speech recognition, or translation continuously while a device remains responsive. The system still needs to account for microphone processing, model startup, audio buffers, and the delay users perceive.
Camera and image processing can classify scenes, segment objects, or improve images without uploading every frame. Resolution, frame rate, model size, and image preprocessing affect memory traffic and latency; a benchmark using a single still image may not predict camera performance.
Local assistants and accessibility tools can run selected model components on-device, especially when response time or offline use matters. Larger generative models may exceed NPU memory or operator support, so applications can use a smaller local model, a GPU or CPU path, or a remote service for selected tasks.
Industrial and automotive systems can use neural accelerators for perception or sensor processing near the source. These systems have stricter requirements for predictable timing, temperature range, safety validation, and long-term driver support than a one-off consumer benchmark.
Getting Started: Test an NPU-Backed Model
Begin by identifying the operating system, processor, driver, runtime, and model format. Then check the runtime’s documentation for the exact device and operators it supports. On Windows devices, Microsoft recommends Windows ML for its managed execution-provider discovery. The NPU developer guidance describes supported Windows paths and points developers to the current runtime workflow.
For a Qualcomm Snapdragon device running supported Windows ARM64 software, ONNX Runtime documents a QNN execution provider that can use its HTP backend for NPU inference. The following installation command is specific to that environment; installing a Python package on an unrelated computer does not add NPU hardware or a compatible driver.
python -m pip install onnxruntime-qnn
With a compatible model.onnx in the current directory, check that the provider is available before creating a session:
import onnxruntime as ort
available = ort.get_available_providers()
if "QNNExecutionProvider" not in available:
raise RuntimeError(
"QNNExecutionProvider is unavailable; check the supported device, "
"Python environment, runtime package, and driver."
)
providers = ["QNNExecutionProvider"]
if "CPUExecutionProvider" in available:
providers.append("CPUExecutionProvider")
session = ort.InferenceSession("model.onnx", providers=providers)
print("Providers registered for this session:", session.get_providers())
This is a provider-availability check, not proof that the full graph runs on the NPU. An unsupported operation may use the CPU provider, and session creation does not measure application performance. Use runtime profiling or provider diagnostics to inspect graph placement, then compare the same inputs and outputs on the CPU baseline and NPU path.
For a fair test, warm up the model, separate first-run compilation from steady-state inference, and measure repeated realistic requests. Record latency percentiles, throughput, memory use, energy if available, output quality, and fallback behavior. Include preprocessing and data transfers in end-to-end measurements. The relevant comparison is not peak TOPS; it is whether the supported NPU path meets the application’s quality, response-time, and energy requirements.
Common Misconceptions
“More TOPS means a faster AI application.” Peak TOPS describes a theoretical compute rate, not operator coverage, memory access, graph partitioning, compilation time, or application latency.
“An NPU automatically makes every model run locally.” A model needs compatible operations, data types, memory, a runtime, and drivers. Some operations may fall back to another processor, and some models may not fit.
“On-device processing guarantees privacy and efficiency.” Local inference can reduce data transmission, but applications still need responsible data handling. An NPU can also consume power or add latency if it triggers conversions and transfers that the alternative path avoids.
“NPU is one interchangeable standard.” The term covers different hardware architectures and software stacks. ONNX, WebNN, and runtime APIs provide useful layers of interoperability, but they do not erase provider-specific limits.
Related Articles
- Edge AI computing explains how local inference fits into device, gateway, and cloud architectures.
- AI model compression techniques compares quantization and other ways to fit a model to deployment hardware.
- ONNX Runtime execution providers and model portability covers graph partitioning, runtime backends, and fallback.
- High-bandwidth memory architecture explains a different memory design used by large accelerators.
- CUDA, ROCm, and Vulkan GPU compute APIs compares general GPU programming stacks.
Changelog and Last Updated
- Initial publication; hardware and runtime behavior checked against Microsoft, ONNX Runtime, Intel OpenVINO, W3C, and Qualcomm documentation.
Last updated: November 15.

