Deep Learning Inference on Heterogeneous Mobile Processors: Potentials and Pitfalls

Sicong Liu, Wentao Zhou, Zimu Zhou, Bin Guo, Minfan Wang, Cheng Fang, Zheng Lin, Zhiwen Yu

Introduction

We have entered the era of "on-device intelligence," where critical tasks such as facial recognition, real-time augmented reality (AR), and natural language processing are executed locally on mobile devices. To meet these intensive computational demands, modern mobile System-on-Chips (SoCs) have evolved into heterogeneous architectures, featuring a diverse array of specialized processors including CPUs, GPUs, NPUs, and DSPs.

While the theoretical potential for "parallel inference"—distributing a single neural network's workload across these multiple cores—is significant, current deep learning frameworks often struggle to realize these gains. This paper provides a comprehensive empirical study of the reality of mobile parallel execution, identifying critical gaps between theoretical optimization and the "messy" reality of dynamic mobile environments.

The Optimization Stack

To address the complexities of heterogeneous execution, the authors evaluate an optimization stack operating at two distinct levels: frontend and backend compilation.

The cross-level optimization stack for deep learning inference on heterogeneous mobile processors.
  • Frontend Compilation: Focuses on model-level optimizations such as pruning (removing redundant connections) and quantization (reducing numerical precision) to lower the overall resource footprint.
  • Backend Compilation: Handles the mapping of the computational Directed Acyclic Graph (DAG) to hardware. This includes operator fusion to minimize memory I/O and parallel scheduling to determine which processor handles specific model segments.

The study highlights that a lack of coordination between these levels often leads to inefficiencies, particularly when software operators are not supported by the targeted hardware accelerator.

Experimental Methodology

The researchers conducted a holistic study using eight commercial mobile devices, spanning a range of hardware including the Qualcomm Snapdragon 855/870, HiSilicon Kirin 985, and Google Tensor. The evaluation focused on standard visual deep learning models:

  • Object Detection and Recognition: YOLOv2, VGG-16, ResNet-18/50/34, and RegNetX.
  • Specialized Vision Tasks: PoseNet (pose estimation), Fast Style Transfer (image stylization), and RetinaFace (face detection).

Performance was benchmarked against state-of-the-art frameworks such as Mace, CoDL, and NN-Stretch across varying granularities of parallelism, from sub-graph splitting to individual operator partitioning.

Real-World Bottlenecks and Insights

The study identifies several critical pitfalls that hinder parallel inference performance:

The Compatibility Gap and Fallback Penalty

A major hurdle is that specialized processors do not support every mathematical operator within a model. When a GPU or NPU encounters an unsupported operation, the system must "fallback" to the CPU. For example, on a Xiaomi 9 running ResNet-50, nearly 48% of operators were unsupported by specialized schemes, forcing CPU reversion. This creates massive bottlenecks, often leaving powerful accelerators idle while the CPU becomes overloaded.

The Dynamic Environment

Mobile devices are rarely dedicated to a single task. Background processes, UI rendering, and thermal throttling create a volatile environment. The authors found that while coarse-grained parallelism (splitting large model chunks) is effective when a device is idle, fine-grained parallelism (splitting small operations) is far more resilient to interference from other active applications.

The "Good Neighbor" Effect

Parallel inference offers benefits beyond raw latency reduction. By offloading specific workloads from the GPU to the CPU, the system can improve overall system health. In tests involving simultaneous video playback and AI inference, parallel strategies reduced frame drops in the video player by up to 90%, ensuring a smoother user experience even if the AI task itself did not see a significant speedup.

Performance Benchmarking

The results demonstrate that while parallel inference is powerful, its success is highly dependent on hardware architecture and the optimization framework used.

Latency comparison across different mobile SoCs and deep learning frameworks.

Key findings include:

  • Framework Success: By combining frontend pruning with backend operator fusion and parallel execution (via the CoDL framework), the researchers achieved a 48.4% reduction in latency on the Snapdragon 855.
  • Architecture Variance: Performance varies wildly across SoCs. CoDL showed significant speedups on Adreno GPUs (Snapdragon) but encountered 1.4x to 1.8x higher latencies on Mali GPUs (Kirin) due to differences in how these chips handle image versus buffer data types.
  • Thermal Resilience: As device temperatures rose (from 30°C to 70°C), parallel execution became increasingly beneficial. By distributing the heat-generating workload across multiple components, the system mitigated the impact of thermal throttling.

Conclusion and Future Directions

This research underscores that parallel inference on mobile devices is not a "free lunch." The overhead of coordination and the penalties of operator fallbacks can often outweigh the benefits of multi-core execution.

Future work should move toward runtime latency profiling, creating systems capable of sensing real-time device states—such as thermal levels or cache contention—and adjusting parallel strategies dynamically. Additionally, better integration of data reuse strategies is needed to reduce the communication costs inherent in heterogeneous processing. While the current study focused on visual tasks, extending these insights to Large Language Models (LLMs) and audio processing remains a vital frontier for on-device intelligence.

Summary updated

BibTeX
@inproceedings{liu2024deep,
  author = {Sicong Liu and Wentao Zhou and Zimu Zhou and Bin Guo and Minfan Wang and Cheng Fang and Zheng Lin and Zhiwen Yu},
  title = {{Deep Learning Inference on Heterogeneous Mobile Processors: Potentials and Pitfalls}},
  booktitle = {AdaAIoTSys@MobiSys},
  year = {2024},
  doi = {10.1145/3662007.3663881},
}
Figure