Deep Graph Library Optimizations for Intel(R) x86 Architecture

Sasikanth Avancha, Md. Vasimuddin, Sanchit Misra, Ramanarayan MohantyarXiv 2020

Deep Graph Library Optimizations for Intel(R) x86 Architecture

Introduction

Graph Neural Networks (GNNs) have emerged as a powerful paradigm for processing data with complex relational structures, ranging from social networks to molecular biology. However, the computational demands of GNNs often outpace the efficiency of standard deep learning frameworks. Researchers at Intel Labs have addressed this by significantly accelerating GNN performance on x86 CPUs through targeted optimizations in the Deep Graph Library (DGL). By redesigning core aggregation primitives and applying high-performance computing (HPC) techniques, they achieved speedups between 1.5× and 13× across various GNN applications.

The Bottleneck: The Push Model

The primary computational bottleneck in GNNs is the Aggregation step, where nodes collect and process information from their neighbors. Traditionally, DGL handled this using a "push" model. In this approach, each source node "pushes" its feature data to its neighbors.

Algorithm 1: The baseline Copy-Reduce Push model used in DGL.

On CPU architectures, the push model introduces two critical performance issues:

  1. Race Conditions: When multiple threads attempt to update the same destination node simultaneously, the system must implement "critical sections" or serialization to ensure data integrity. This effectively kills parallel performance.
  2. Memory Inefficiency: The push model results in "scatter-heavy" memory access patterns. Data is written to non-contiguous memory locations, leading to poor cache utilization and inefficient use of memory bandwidth.

Optimizing Core Primitives

To overcome these limitations, the researchers focused on optimizing two fundamental DGL primitives: Binary-Reduce (BR) and Copy-Reduce (CR).

Binary-Reduce (BR) and Copy-Reduce (CR) operations optimized in this work.

The core of the optimization strategy was the transition to a "Pull" Model. Instead of source nodes pushing data, each destination node is responsible for "pulling" data from its neighbors. Because each thread is assigned a unique destination node, write collisions are eliminated, removing the need for slow serialization and unlocking the CPU's parallel potential.

Beyond the architectural shift, several classic HPC techniques were applied:

  • Sparse-Dense Matrix Multiply (SpMM) Logic: Aggregation was treated as a specialized form of SpMM to leverage existing mathematical optimizations.
  • Radix Sorting: By sorting blocks of rows by ID, the researchers improved data reuse. This increases the likelihood that source node data resides in the L2 cache when needed by multiple threads.
  • Cache Blocking: Implementing blocking on both node (K) and feature (N) dimensions ensures that data fits within the Last Level Cache (LLC) during processing, minimizing high-latency trips to DRAM.
  • Holistic Backend Optimization: Profiling revealed that once aggregation was optimized, other PyTorch primitives like BatchNorm1d and Embedding became new bottlenecks. These were subsequently optimized for better CPU performance.

Experimental Results

The team evaluated these optimizations across standard benchmarks (Pubmed, Reddit, Amazon OGB-Products) and specialized synthetic datasets. The results demonstrate dramatic performance gains across seven different GNN architectures without any loss in model accuracy:

  • GAT on Pubmed: 12.8× speedup.
  • GCN on Reddit: 12.3× speedup.
  • GraphSAGE on Reddit: 7.7× speedup.
  • LGNN on SBM: 2.07× speedup.

At the primitive level, specific Binary-Reduce operations saw performance increases of up to 34× compared to the baseline DGL implementation.

Conclusion

This work demonstrates that standard AI libraries often overlook classic HPC optimizations that are vital for sparse data structures like those found in GNNs. By shifting from a scatter-heavy "push" model to a gather-centric "pull" model and applying rigorous cache management, the researchers have significantly extended the viability of x86 CPUs for high-performance GNN training and inference. Future work will focus on refining these kernels for massive, full-graph processing and improving integration in heterogeneous CPU+GPU environments.

Summary updated

BibTeX
@misc{avancha2020deep,
  author = {Sasikanth Avancha and Md. Vasimuddin and Sanchit Misra and Ramanarayan Mohanty},
  title = {{Deep Graph Library Optimizations for Intel(R) x86 Architecture}},
  year = {2020},
  eprint = {2007.06354},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.06354},
}
Figure