[Paper Review] MobiRNN: Efficient Recurrent Neural Network Execution on Mobile GPU
MobiRNN is a mobile-optimized framework that enables efficient GPU offloading of Recurrent Neural Network (RNN) inference on smartphones using Android's RenderScript runtime. It achieves over 4x latency reduction on RNNs for activity recognition compared to CPU-only execution, outperforming desktop GPU offloading techniques that degrade performance on mobile hardware.
In this paper, we explore optimizations to run Recurrent Neural Network (RNN) models locally on mobile devices. RNN models are widely used for Natural Language Processing, Machine Translation, and other tasks. However, existing mobile applications that use RNN models do so on the cloud. To address privacy and efficiency concerns, we show how RNN models can be run locally on mobile devices. Existing work on porting deep learning models to mobile devices focus on Convolution Neural Networks (CNNs) and cannot be applied directly to RNN models. In response, we present MobiRNN, a mobile-specific optimization framework that implements GPU offloading specifically for mobile GPUs. Evaluations using an RNN model for activity recognition shows that MobiRNN does significantly decrease the latency of running RNN models on phones.
Motivation & Objective
- To address the lack of efficient on-device RNN inference on mobile devices due to privacy and connectivity constraints.
- To overcome the limitations of existing CNN-optimized mobile deep learning frameworks, which do not generalize to RNNs due to sequential dependencies.
- To design a mobile-specific GPU offloading solution that works efficiently on resource-constrained mobile GPUs with limited cores and memory.
- To evaluate the performance of GPU offloading under varying model complexities and GPU workloads on real mobile devices.
- To provide a practical, open-source framework for deploying RNNs efficiently on mobile platforms.
Proposed method
- MobiRNN uses Android's RenderScript runtime to automatically parallelize RNN computations across mobile GPU cores without manual parallelization logic.
- It offloads Long Short-Term Memory (LSTM) network inference to the mobile GPU, leveraging RenderScript’s data-parallel execution model.
- The framework supports multi-layered LSTM models and dynamically manages memory and computation based on model size and device constraints.
- Performance evaluation is conducted on real mobile devices (Nexus 5 and Nexus 6P) using an activity recognition RNN model with sensor inputs.
- GPU utilization is monitored via ADB scripts and GPU APIs to assess the impact of concurrent workloads on inference latency.
- The implementation includes both GPU and CPU execution modes, with the CPU mode using multi-threaded execution via RenderScript for fair comparison.
Experimental results
Research questions
- RQ1Can GPU offloading significantly reduce RNN inference latency on mobile devices compared to CPU-only execution?
- RQ2How does the performance of GPU offloading on mobile GPUs compare to desktop GPU offloading techniques designed for larger, more powerful hardware?
- RQ3How does model complexity—measured in number of hidden units or layers—affect the speedup from GPU offloading?
- RQ4To what extent does concurrent GPU workload (e.g., rendering) impact the performance of RNN inference on mobile GPUs?
- RQ5Does multi-threaded CPU execution provide a viable alternative to GPU offloading for RNN inference on mobile devices?
Key findings
- MobiRNN reduces RNN inference latency by over 4x compared to CPU-only execution on mobile devices, significantly improving real-time performance.
- GPU offloading techniques designed for desktop GPUs degrade performance by approximately 4x on mobile devices, highlighting the need for mobile-specific optimization.
- The speedup from GPU offloading depends on device type, model complexity, and GPU utilization, with performance saturating for models with high hidden unit counts due to memory bandwidth limitations.
- Multi-threaded CPU execution achieves at least 70% of the performance benefit of GPU offloading, indicating that CPU parallelization is a strong alternative in some scenarios.
- High GPU utilization (over 70%) significantly reduces the benefit of GPU offloading, and in some cases, CPU execution becomes faster than GPU execution under heavy GPU load.
- The framework demonstrates that GPU offloading is most effective under low to medium GPU load, and should be dynamically managed based on real-time GPU utilization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.