Skip to main content
QUICK REVIEW

[Paper Review] pCAMP: Performance Comparison of Machine Learning Packages on the Edges

Xingzhou Zhang, Yifan Wang|arXiv (Cornell University)|Jun 5, 2019
Advanced Neural Network ApplicationsComputer Science19 references50 citations
TL;DR

This paper compares TensorFlow, Caffe2, MXNet, PyTorch, and TensorFlow Lite for edge inference using AlexNet and SqueezeNet across several edge devices, evaluating latency, memory footprint, and energy.

ABSTRACT

Machine learning has changed the computing paradigm. Products today are built with machine intelligence as a central attribute, and consumers are beginning to expect near-human interaction with the appliances they use. However, much of the deep learning revolution has been limited to the cloud. Recently, several machine learning packages based on edge devices have been announced which aim to offload the computing to the edges. However, little research has been done to evaluate these packages on the edges, making it difficult for end users to select an appropriate pair of software and hardware. In this paper, we make a performance comparison of several state-of-the-art machine learning packages on the edges, including TensorFlow, Caffe2, MXNet, PyTorch, and TensorFlow Lite. We focus on evaluating the latency, memory footprint, and energy of these tools with two popular types of neural networks on different edge devices. This evaluation not only provides a reference to select appropriate combinations of hardware and software packages for end users but also points out possible future directions to optimize packages for developers.

Motivation & Objective

  • Motivate evaluation of ML packages on edge devices where training is cloud-based and inference occurs at the edge.
  • Quantify latency, memory usage, and energy for representative CNN models on diverse edge hardware.
  • Identify strengths and trade-offs of each package across different hardware setups to guide package/hardware pairing.

Proposed method

  • Evaluate five ML packages (TensorFlow, Caffe2, MXNet, PyTorch, TensorFlow Lite) for edge inference.
  • Use pretrained AlexNet (large-scale) and SqueezeNet (small-scale) models from official model zoos.
  • Test on MacBook Pro, Intel FogNode, NVIDIA Jetson TX2, Raspberry Pi, and Nexus 6P with CPU/GPU configurations.
  • Measure inference time, total time, memory footprint, and energy consumption.
  • Profile the time distribution by dividing inference into seven components (load model, load image, inferences, etc.).
  • Ensure fairness by using publicly available pretrained models and reporting baseline power for energy calculations.

Experimental results

Research questions

  • RQ1Which ML packages offer the best inference latency on different edge hardware for large and small CNNs?
  • RQ2How do memory footprint and energy consumption compare across packages on edge devices?
  • RQ3Are there noticeable trade-offs (time vs. space) that would guide selecting a package for a given device and model?
  • RQ4Does model loading time dominate total inference time on edge devices, and how does this vary by package and hardware?

Key findings

  • No single package dominates all hardware and models; each has merits on different platforms.
  • Loading a model often takes longer than running the model itself for several packages, indicating potential optimization opportunities.
  • MXNet frequently shows strong performance on certain GPUs (e.g., Jetson TX2) and can trade memory usage for faster inference; TensorFlow can be faster for CPU-based large models on FogNode but uses more memory.
  • Caffe2 tends to be energy-efficient on some platforms, but its latency can be higher for certain configurations (e.g., on FogNode for AlexNet).
  • TensorFlow Lite enables on-device inference on small devices (Nexus 6P) with notably lower resource requirements, albeit with limited model availability (MobileNet in this case).
  • Overall, MXNet, TensorFlow, PyTorch, and Caffe2 each excel under different hardware/model combinations, underscoring the need to pair hardware with a suitable package for edge inference.
  • Insight: There is a positive correlation between latency and energy consumption across tested configurations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.