Scheduling Computation Graphs of Deep Learning Models on Manycore CPUs

Linpeng Tang, Yida Wang, Theodore L. Willke, Kai LiarXiv 2018

Researchers from Princeton and Intel have introduced Graphi, a high-performance execution engine designed to unlock the potential of manycore CPUs for deep learning workloads. By rethinking computation graph scheduling and execution, Graphi achieves significant speedups over mainstream frameworks like TensorFlow.

The Challenge of Manycore Architectures

While GPUs are the standard for deep learning, manycore CPUs (featuring 60+ cores) are widely available but often under-utilized. Current frameworks like TensorFlow and MXNet face three primary bottlenecks on these architectures:

  1. Operation Saturation: Individual operations, such as matrix multiplication, do not scale linearly to 64+ cores. Beyond 8 or 16 cores, adding threads often yields diminishing returns or increased overhead.
  2. Resource Contention: Naive parallelization leads to multiple operations competing for the same physical cores or shared L2 caches.
  3. Sub-optimal Scheduling: Most frameworks use simple FIFO queues, ignoring the "critical path"—the sequence of dependent operations that determines minimum execution time.
Architecture of a manycore CPU tile showing cores, VPUs, and shared L2 cache.

The complexity of the hardware, as seen in the tile-based architecture above, necessitates a more sophisticated approach to resource management than standard OS scheduling provides.

The Graphi Execution Engine

Graphi addresses these issues through three main components:

  • The Profiler: Estimates operation duration and determines the optimal parallelism scheme (e.g., balancing the number of executors versus threads per executor).
  • The Centralized Scheduler: Uses Critical-Path First Scheduling to prioritize operations on the longest dependency chains, minimizing total execution time (makespan).
  • The Executors: Teams of threads assigned to specific operations. Graphi pins threads to specific physical cores and tiles to ensure executors do not share L2 caches, eliminating hardware-level interference.

Key Insights and Performance

A core finding of the research is the "sweet spot" of parallelism. For manycore CPUs, it is generally more efficient to run multiple operations in parallel—each using a subset of cores—rather than executing one operation at a time using the entire processor.

Comparison of total GFLOPS for GEMM and Element-wise Multiplication across different executor configurations and pinning strategies.

As shown in the figure above, performance for both GEMM and element-wise operations improves significantly when using multiple executors (e.g., 8x8 or 16x4) compared to a single executor using all 64 threads (1x64). Furthermore, manual thread pinning consistently outperforms OS-managed scheduling by up to 45%, as the OS is unaware of the physical tile layout, leading to cache misses and synchronization overhead.

Results and Conclusion

Evaluated on a 68-core Intel Xeon Phi 7250 across models like LSTM, PathNet, and GoogleNet, Graphi achieved speedups of 2.1x to 9.5x over TensorFlow. The most dramatic gains were seen in PathNet (9.5x), which has a highly parallel structure that Graphi’s scheduler exploited effectively.

By combining centralized, hardware-aware scheduling with precise thread pinning, Graphi demonstrates that manycore CPUs can be highly competitive for deep learning tasks when the execution engine is tailored to the underlying architecture. Future work includes extending these principles to dynamic computation graphs and distributed multi-node systems.

Summary updated

BibTeX
@misc{tang2018scheduling,
  author = {Linpeng Tang and Yida Wang and Theodore L. Willke and Kai Li},
  title = {{Scheduling Computation Graphs of Deep Learning Models on Manycore CPUs}},
  year = {2018},
  eprint = {1807.09667},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.09667},
}
Figure