NNAPI (Neural Networks API) delegation is the process where the Android runtime selectively offloads supported operations from a machine learning model to a dedicated hardware accelerator—such as an NPU, DSP, or GPU—for execution. This hardware-aware offloading is managed by the NNAPI driver stack, which acts as an intermediary between the high-level model graph and the vendor-specific hardware-specific kernels. The primary goal is to leverage specialized silicon for energy-efficient inference and lower latency compared to running entirely on the device's CPU.
Glossary
NNAPI Delegation

What is NNAPI Delegation?
NNAPI delegation is a core Android runtime mechanism for hardware-accelerated machine learning inference.
Delegation occurs during graph compilation when the NNAPI runtime partitions the model. Operations with compatible vendor SDKs and drivers are delegated, while unsupported ops fall back to the CPU. This requires the model to be converted into a format the accelerator understands, often involving operator fusion and memory-bound optimization by the vendor's compiler. Successful delegation is a key outcome of hardware-aware compression strategies like quantization-aware training, as the accelerator's supported precision (e.g., INT8) must match the model's format.
Key Characteristics of NNAPI Delegation
NNAPI delegation is the mechanism by which Android's Neural Networks API runtime offloads supported model operations to dedicated hardware accelerators like NPUs, DSPs, or GPUs for faster, more power-efficient execution.
Hardware-Agnostic Interface
NNAPI provides a vendor-neutral C API that abstracts the underlying hardware. This allows developers to write a single model implementation that can delegate to Qualcomm's Hexagon DSP, Google's Edge TPU, MediaTek's APU, or other accelerators without code changes. The runtime handles driver discovery and capability checks.
Selective Operation Offloading
Delegation is not all-or-nothing. The NNAPI runtime partitions the model's computational graph, delegating only supported operations to the accelerator. Unsupported ops fall back to the CPU. This requires the accelerator's driver to implement a NNAPI HAL (Hardware Abstraction Layer) that declares its capability set (e.g., which ops and data types it supports).
Memory Management & Zero-Copy
For peak performance, NNAPI delegates manage memory buffers to minimize data movement. The ideal scenario is zero-copy or shared memory, where input/output tensors are allocated in memory accessible by both the CPU and the accelerator (e.g., ARM's ION allocator). This avoids expensive copies between CPU and accelerator memory spaces.
Quantization for Efficient Execution
Hardware accelerators are often optimized for integer (INT8) arithmetic. NNAPI delegation strongly encourages or requires models to be quantized. The runtime supports:
- Asymmetric quantization (scale & zero-point)
- Symmetric quantization
- Per-channel quantization for weights Delegation fails if the model uses float operations where the hardware only supports integer.
Compilation & Caching
Before execution, the model's graph is compiled for the target accelerator. This involves:
- Operator fusion (e.g., Conv + Bias + ReLU)
- Kernel selection from the vendor's driver
- Memory layout optimization
The compiled execution plan is cached (often in a
.nbfile for Qualcomm SNPE) to avoid recompilation on subsequent runs, reducing latency.
Fallback & Co-Execution
The system is designed for resilience. If delegation fails (e.g., driver error, unsupported subgraph), execution falls back entirely to the CPU. Some advanced setups support co-execution, where different parts of the model run on different processors (e.g., vision layers on DSP, NLP layers on NNAPI's own GPU delegate). Performance is highly dependent on the vendor's driver implementation quality.
How NNAPI Delegation Works: The Offload Pipeline
NNAPI delegation is the core mechanism within Android's Neural Networks API that enables the runtime to identify and offload supported portions of a computational graph to a dedicated hardware accelerator for execution.
The process begins with graph partitioning. The NNAPI runtime analyzes the model's computational graph, identifying subgraphs containing operations supported by available hardware drivers (e.g., for an NPU, DSP, or GPU). These supported subgraphs are marked for delegation, while unsupported operations remain on the CPU. The runtime then compiles the delegated subgraph into a vendor-specific executable format using the accelerator's driver.
During inference, the runtime orchestrates heterogeneous execution. It dispatches the compiled subgraph to the accelerator via the driver, manages memory allocation for input/output tensors in shared or device memory, and synchronizes execution with remaining CPU operations. This offload pipeline minimizes data transfers and leverages the accelerator's efficiency for supported ops, reducing latency and power consumption while maintaining the model's functional correctness.
Frameworks and Hardware Utilizing NNAPI Delegation
NNAPI delegation is a key Android runtime feature, but its utility is realized through integration with major ML frameworks and support from silicon vendors. This ecosystem enables developers to write once and deploy efficiently across diverse hardware.
MediaTek NeuroPilot & APU
MediaTek's NeuroPilot SDK and its AI Processing Units (APUs) are designed with NNAPI delegation as a core deployment target. Their system-on-chips (SoCs) provide:
- Dedicated NPU Cores: Hardware designed for efficient matrix and convolution operations.
- NeuroPilot Delegate: A vendor-specific delegate that often sits under the NNAPI delegate, providing further optimizations for MediaTek silicon.
- Multi-Core Heterogeneity: APUs can split workloads across different types of cores (e.g., performance vs. efficiency) managed via NNAPI preferences.
Qualcomm Snapdragon & Hexagon NPU
Qualcomm's Snapdragon platforms feature the Hexagon Tensor Processor (HTP), a dedicated NPU. NNAPI delegation routes supported ops to the HTP via the Qualcomm driver stack.
- Hexagon NN Direct: While Qualcomm offers its proprietary Snapdragon Neural Processing Engine (SNPE) SDK, NNAPI provides a standardized alternative.
- Power Efficiency: Delegation to the Hexagon NPU significantly reduces power consumption compared to CPU/GPU execution for sustained AI tasks.
- Quantization Optimization: The HTP is highly optimized for INT8 and mixed-precision inference, aligning with NNAPI's quantization support.
Google Tensor & Edge TPU
Google's custom Tensor SoC (used in Pixel phones) integrates the Edge TPU as a primary AI accelerator. NNAPI delegation is the standard mechanism for accessing it from Android apps.
- Pixel-Only Optimization: The tight hardware/software co-design allows for highly efficient driver communication and memory management via NNAPI.
- Google's TensorFlow Lite Runtime: The default ML stack on Pixel devices is optimized to use NNAPI delegation to the Edge TPU seamlessly. This represents a vertically integrated example of NNAPI's role in connecting frameworks to custom silicon.
Samsung Exynos & NPU
Samsung Exynos SoCs incorporate a dedicated NPU which is exposed to the Android runtime via NNAPI. Key aspects include:
- Tri-Cluster NPU Design: Some Exynos NPUs use a multi-core architecture for balancing throughput and efficiency, managed through NNAPI's abstraction.
- Samsung ONE SDK: While offering a full proprietary SDK, NNAPI delegation provides a vendor-agnostic path for framework-integrated models.
- Device-Specific Tuning: NNAPI allows Samsung to optimize driver performance for its own hardware without requiring app developers to write custom code.
Frequently Asked Questions
NNAPI (Neural Networks API) delegation is a core Android mechanism for accelerating machine learning models. These questions address how it works, its benefits, and key considerations for developers.
NNAPI delegation is a runtime mechanism within Android's Neural Networks API that allows the framework to offload supported operations from a machine learning model to a dedicated hardware accelerator—such as an NPU, DSP, or GPU—for execution. It works by the Android runtime analyzing the model's computational graph. When the app requests execution via NNAPI, the runtime identifies subgraphs containing operations supported by available hardware drivers. It then delegates those subgraphs to the appropriate vendor-provided driver, which executes them on the specialized hardware, while any unsupported operations fall back to the CPU. This process is largely transparent to the app, which interacts with the standard NNAPI interface.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
NNAPI delegation is a key component of the Android hardware acceleration stack. These related concepts define the ecosystem of tools, formats, and optimization techniques that enable efficient on-device AI execution.
Hardware Abstraction Layer (HAL)
The NNAPI Hardware Abstraction Layer (HAL) is a vendor-implemented interface that sits between the Android NNAPI runtime and the actual accelerator driver (e.g., for an NPU or DSP). It is the critical bridge for delegation:
- Vendor Responsibility: Chip manufacturers (Qualcomm, MediaTek, Google) implement the HAL to expose their hardware's capabilities.
- Operation Mapping: The HAL declares which neural network operations (ops) and data types (e.g., INT8, FP16) it supports for acceleration.
- Driver Isolation: It abstracts low-level driver details, allowing NNAPI to work with diverse hardware through a standardized interface.
Android Neural Networks API (NNAPI)
The Android Neural Networks API is the foundational Android C/C++ API that defines the standard for on-device machine learning operations. NNAPI delegation is a feature of its runtime:
- Runtime & Driver: Consists of the NNAPI runtime (in Android framework) and the vendor HAL/driver. The runtime manages delegation decisions.
- Operation Set: Defines a comprehensive list of neural network operations (e.g.,
CONV_2D,FULLY_CONNECTED,LSTM) that hardware can support. - Execution Model: Supports asynchronous, burst, and caching modes. Delegation occurs when the runtime partitions a model graph, sending subgraphs to available accelerators via the HAL.
TFLite Delegates
TFLite Delegates are the pluggable components that enable TensorFlow Lite to offload computational work to accelerators. The NNAPI Delegate is one specific implementation:
- Delegate Pattern: The TFLite interpreter analyzes the model graph and passes supported subgraphs to a registered delegate for execution.
- Types of Delegates:
- NNAPI Delegate: For Android hardware acceleration.
- GPU Delegate: For cross-platform GPU acceleration (OpenGL/Vulkan).
- Hexagon Delegate: For Qualcomm Hexagon DSPs (often superseded by NNAPI).
- Custom Delegates: For proprietary accelerators or experimental hardware.
- Fallback Mechanism: Operations not supported by the delegate fall back to the CPU for execution.
Model Quantization
Model Quantization is a compression technique that reduces the numerical precision of a model's weights and activations. It is intrinsically linked to NNAPI delegation because most mobile accelerators are optimized for low-precision math:
- Hardware Requirement: NPUs and DSPs commonly have superior performance and power efficiency for INT8 or FP16 operations versus FP32.
- Delegation Prerequisite: A model must often be quantized (e.g., to INT8 via Post-Training Quantization or Quantization-Aware Training) for the NNAPI HAL to accept and accelerate it.
- Performance Trade-off: Enables faster inference and lower power consumption at the potential cost of a minor accuracy drop, which is managed through calibration.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us