Skip to main content
QUICK REVIEW

[Paper Review] Caffe con Troll: Shallow Ideas to Speed Up Deep Learning

Stefan Hadjis, Firas Abuzaid|arXiv (Cornell University)|Apr 16, 2015
Video Analysis and SummarizationComputer Science9 references23 citations
TL;DR

Caffe con Troll (CcT) is a re-architected, fully compatible version of Caffe that accelerates deep learning via optimized CPU batching and automatic selection of optimal convolution lowering strategies. It achieves up to 4.5× speedup on CPU-only training and enables hybrid CPU-GPU acceleration, with 15%+ end-to-end speedup on EC2 GPU instances by leveraging underutilized CPU resources.

ABSTRACT

We present Caffe con Troll (CcT), a fully compatible end-to-end version of the popular framework Caffe with rebuilt internals. We built CcT to examine the performance characteristics of training and deploying general-purpose convolutional neural networks across different hardware architectures. We find that, by employing standard batching optimizations for CPU training, we achieve a 4.5x throughput improvement over Caffe on popular networks like CaffeNet. Moreover, with these improvements, the end-to-end training time for CNNs is directly proportional to the FLOPS delivered by the CPU, which enables us to efficiently train hybrid CPU-GPU systems for CNNs.

Motivation & Objective

  • To study the performance characteristics of training and deploying general-purpose CNNs across diverse hardware architectures, particularly CPUs and GPUs.
  • To identify and optimize key bottlenecks in deep learning workloads, especially convolutional layers, which consume 70–90% of training time.
  • To explore the tradeoffs between different matrix-multiplication-based lowering techniques for convolutions on CPUs and GPUs.
  • To enable hybrid CPU-GPU systems for CNNs by demonstrating that underutilized CPUs can significantly boost throughput.
  • To build a fully compatible, end-to-end system that matches Caffe’s output while improving performance through architectural and algorithmic optimizations.

Proposed method

  • Forked Caffe and rebuilt its internals to create CcT, a fully compatible end-to-end system that preserves Caffe’s layer-wise output.
  • Employed standard batching optimizations for CPU training, which are often omitted in existing frameworks, to improve memory access and parallelism.
  • Explored three distinct lowering strategies that remap 3D convolution operations into matrix multiplications using BLAS-compatible libraries like OpenBLAS and Intel MKL.
  • Proposed an automatic optimizer that selects the best lowering strategy based on the input-to-output channel ratio of the convolution layer.
  • Designed and evaluated a hybrid CPU-GPU system where both processors execute the same convolutional layer simultaneously, leveraging underutilized CPU cores on GPU instances.
  • Measured end-to-end training time and throughput on EC2 instances with varying CPU and GPU configurations to evaluate performance scaling and FLOPS proportionality.

Experimental results

Research questions

  • RQ1Can standard CPU batching optimizations significantly improve end-to-end training throughput in deep learning frameworks?
  • RQ2How do different lowering strategies for convolution operations affect performance on CPUs and GPUs?
  • RQ3What is the optimal strategy for selecting a lowering technique based on the input-to-output channel ratio of a convolution layer?
  • RQ4Can hybrid CPU-GPU systems achieve better performance than homogeneous CPU-only or GPU-only systems for CNN training?
  • RQ5To what extent is end-to-end training time proportional to the FLOPS delivered by the CPU, and can this proportionality be exploited for system design?

Key findings

  • CcT achieves a 4.5× end-to-end throughput improvement over Caffe on popular networks like CaffeNet through CPU batching optimizations alone.
  • End-to-end training time on CPUs is directly proportional to the FLOPS delivered by the CPU, validating the use of FLOPS as a performance predictor.
  • The optimal convolution lowering strategy depends on the input-to-output channel ratio, and a simple automatic optimizer can select the best variant, contributing up to 5% end-to-end performance gain.
  • On EC2 g2.2xlarge GPU instances, adding the CPU to the GPU for a single convolutional layer yields over 20% higher throughput, even with an older, underpowered CPU.
  • Hybrid systems achieve >15% end-to-end speedup with 1 GPU + CPU and over 3× speedup with 4 GPUs on the EC2 g2.8xlarge instance, demonstrating the effectiveness of co-processing.
  • The study reveals that CPUs are significantly underutilized in GPU-based cloud instances, and that their integration can yield substantial performance gains without architectural overhaul.

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.