Navigation
⚡ Inference Systems· 10 min read

On-Device Constraints

Limited memory (8-16GB shared), thermal throttling, battery life, NPU/DSP heterogeneity — the constraints that define edge inference.

edgeon-deviceconstraintsmemorythermalnpumobile

Edge inference operates under constraints that don’t exist in data centers: shared memory with the OS, thermal throttling from sustained workloads, battery drain, and heterogeneous accelerators with limited operator coverage.


1. Why On-Device

Four reasons to run models on the device rather than the cloud:

ReasonExample
Low latencyCamera detection, voice wake-word — can’t wait for network round-trip
Offline capabilityAirplane mode, rural areas, factory floors
PrivacyPhotos, voice, health data stay on device
CostHigh-frequency lightweight queries — cheaper locally than cloud API calls

The tradeoff: the engineering constraints expand from “throughput and cost” to “latency, memory, package size, power, temperature, accuracy, AND compatibility.”


2. The Four Constraint Categories

Memory & Storage

Device memory is shared between the OS, apps, and the model:

Mavailable=Mphysical−MOS−Mapps≈40-60% of physicalM_{\text{available}} = M_{\text{physical}} - M_{\text{OS}} - M_{\text{apps}} \approx 40\text{-}60\% \text{ of physical}
DevicePhysical RAMAvailable for model3B model (INT4)
iPhone 15 Pro8 GB~3-4 GB✅ (1.5 GB)
iPhone 16 Pro8 GB~3-4 GB✅
Pixel 9 Pro16 GB~6-8 GB✅
Budget Android4 GB~1.5-2 GB⚠️ Tight

Model file size also matters — users don’t want a 10 GB app download:

ModelFP16INT8INT4
1B2 GB1 GB0.5 GB
3B6 GB3 GB1.5 GB
7B14 GB7 GB3.5 GB

Compute

Mobile SoCs have lower TFLOPS than data center GPUs:

SoCCPU (INT8)GPUNPUTotal
Apple A17 Pro~2 TOPS~2 TOPS35 TOPS~39 TOPS
Snapdragon 8 Gen 3~1.5 TOPS~3 TOPS45 TOPS~50 TOPS
MediaTek Dimensity 9300~1 TOPS~2 TOPS36 TOPS~39 TOPS
H100 (comparison)———~4,000 TOPS (INT8)

The NPU is the powerhouse — but only for operations it supports (see §3).

Thermal & Power

Sustained inference causes heating → thermal throttling → performance drops:

Start:        100% performance, 25°C
After 30s:    95% performance, 35°C
After 2 min:  70% performance, 42°C (throttling)
After 5 min:  50% performance, 45°C (severe throttling)

Battery impact: Continuous LLM inference can drain 10-20% battery per hour on a phone.

Compatibility

Every device has different hardware (CPU ISA, GPU vendor, NPU model) and software (OS version, driver version, runtime support). An operation that runs on one device may not run on another.


3. Hardware Accelerators on Device

AcceleratorStrengthsWeaknessesBest for
CPUUniversal compatibility, broadest op coverageSlowest for matrix mathFallback, small models
GPU (mobile)Good parallelism, Vulkan/MetalScheduling overhead, shared memoryMedium models, flexible workloads
NPUHighest TOPS, best power efficiencyLimited operator coverage, fixed precisionINT8/INT4 inference, standard architectures
DSPUltra-low power, always-onVery limited opsAudio, sensor, wake-word

The NPU challenge: NPUs are fastest but only support a subset of operations. When the model uses an unsupported op:

Model graph: [Conv → ReLU → LayerNorm → Attention → ...]
NPU supports: [Conv ✅, ReLU ✅, LayerNorm ❌, Attention ❌]

→ Graph partitioned: [Conv+ReLU on NPU] → [LayerNorm+Attention on CPU]
→ Data transfer between NPU and CPU adds latency
→ Benefit of NPU partially lost

Always benchmark on the actual target device — not just on a development machine.

For model compression techniques specific to edge, see Model Compression for Edge. For edge runtime options, see Edge Inference Engines.


Self-Check

  • Calculate available memory for a model on a given device (physical - OS - apps)
  • Estimate model file size at different precisions
  • Explain thermal throttling and its impact on sustained inference
  • Compare CPU, GPU, NPU, and DSP for on-device inference
  • Explain the graph partitioning problem when NPU doesn’t support all ops

References