NPU Manager

Android 17 and higher supports the Neural Processing Unit (NPU) Manager (com.android.npumanager), a system component in the Android Open Source Project (AOSP) that coordinates the allocation and scheduling of NPU resources across system services and app workloads. By moving resource arbitration from custom vendor daemons to the Android platform, the NPU Manager increases predictability, prevents resource starvation, manages thermal boundaries, and improves overall device performance.

Background and motivation

Before the NPU Manager, apps and system services submitted machine learning (ML) workloads directly to vendor drivers or proprietary runtimes. That direct-access model introduced several systemic problems:

  • Inefficient resource competition: Heavy ML workloads, such as large language model (LLM) inference engines and on-device vision pipelines, competed directly with other high-priority systems for finite NPU resources, such as static RAM (SRAM), model weight memory, and execution channels.
  • System instability: Uncoordinated workloads could trigger thermal throttling, memory page faults, or background app terminations by the low memory killer daemon (lmkd) when demands exceeded hardware capacity.
  • Static prioritization: The system server couldn't adjust NPU priority in response to context shifts, such as when a background task loaded a large model while a latency-sensitive camera pipeline or assistant was active in the foreground.

The NPU Manager addresses these challenges by acting as a system-level arbiter that gates model loading and dynamically adjusts execution priorities based on current device health and app states.

System architecture

The NPU Manager runs as a system service named npu inside system_server, packaged in the com.android.npumanager system APEX. The service separates platform policy and app lifecycle tracking from low-level system-on-chip (SoC) driver implementations.

The following diagram illustrates the NPU Manager environment layers:

NPU Manager environment layers

Figure 1. NPU Manager environment layers.

Key components

  • Framework API client (android.npumanager.NpuManager): Clients use this entry point to request model load reservations.
  • System service (npu): This service gates model load approvals and issues unload requests based on scheduling priority rules.
  • NPU scheduling HAL (android.hardware.npu): This Android Interface Definition Language (AIDL) hardware abstraction layer (HAL) relays Android app priorities and scheduling callbacks between the framework and the driver.
  • Vendor driver: The driver controls the hardware execution blocks and implements low-level prioritization.

For framework API and HAL details, see Workload scheduling.

Device readiness and diagnostics

Devices that integrate an NPU and support NPU Manager declare the android.hardware.npu hardware feature (PackageManager.FEATURE_NEURAL_PROCESSING_UNIT). Apps can declare optional or required NPU usage in AndroidManifest.xml as shown in the following example:

<uses-feature android:name="android.hardware.npu" android:required="false" />

Inspect service state

During bringup and validation, you can inspect the active model loading policy, model load requests, and per-app user identifier (UID) priorities from adb shell using the following command:

adb shell dumpsys npu

For compatibility test configuration on Android 17 and higher, see Run NPU Manager Mobly tests and Workload scheduling.