[Paper Review] PyGim: An Efficient Graph Neural Network Library for Real Processing-In-Memory Architectures
PyGim is a novel, open-source machine learning framework that accelerates Graph Neural Networks (GNNs) on real Processing-in-Memory (PIM) systems by co-designing software and system-level optimizations. It enables hybrid GNN execution—compute-intensive combination on CPUs/GPUs and memory-intensive aggregation on PIM—using a three-tiered parallelization strategy across PIM clusters, cores, and threads, achieving 3.04× speedup over state-of-the-art CPU baselines with 27% resource utilization on UPMEM PIM hardware.
Graph Neural Networks (GNNs) are emerging ML models to analyze graph-structure data. Graph Neural Network (GNN) execution involves both compute-intensive and memory-intensive kernels, the latter dominates the total time, being significantly bottlenecked by data movement between memory and processors. Processing-In-Memory (PIM) systems can alleviate this data movement bottleneck by placing simple processors near or inside to memory arrays. In this work, we introduce PyGim, an efficient ML library that accelerates GNNs on real PIM systems. We propose intelligent parallelization techniques for memory-intensive kernels of GNNs tailored for real PIM systems, and develop handy Python API for them. We provide hybrid GNN execution, in which the compute-intensive and memory-intensive kernels are executed in processor-centric and memory-centric computing systems, respectively. We extensively evaluate PyGim on a real-world PIM system with 1992 PIM cores using emerging GNN models, and demonstrate that it outperforms its state-of-the-art CPU counterpart on Intel Xeon by on average 3.04x, and achieves higher resource utilization than CPU and GPU systems. Our work provides useful recommendations for software, system and hardware designers. PyGim is publicly available at https://github.com/CMU-SAFARI/PyGim.
Motivation & Objective
- To address the data movement bottleneck in GNNs, which is dominated by memory-intensive aggregation kernels in sparse graph processing.
- To enable efficient, real-world deployment of GNNs on near-bank Processing-in-Memory (PIM) systems, which are commercially available but underutilized in ML workloads.
- To design a software framework that natively supports hybrid execution between processor-centric (CPU/GPU) and memory-centric (PIM) systems for GNNs.
- To optimize GNN aggregation on PIM by introducing multi-level parallelism that balances computation and data movement costs.
- To provide a user-friendly, PyTorch-integrated Python API for easy adoption of PIM-accelerated GNNs by ML practitioners.
Proposed method
- Proposes a Combination of Accelerators (CoA) scheme, offloading compute-intensive GNN combination to CPUs/GPUs and memory-intensive aggregation to PIM systems.
- Introduces Hybrid Parallelism (HP), enabling three levels of parallelism: edge- and feature-level across PIM clusters, vertex/edge-level across cores within clusters, and vertex/edge-level across threads within a PIM core.
- Develops a PIM backend for optimized GNN aggregation, integrated with PyTorch to support both CPU-PIM and GPU-PIM execution workflows.
- Employs multiple Sparse Matrix-Vector Multiplication (SpMV) kernels to implement the SpMM operation required in GNN aggregation, leveraging the best-performing kernel from SparseP.
- Uses real hardware evaluation on the UPMEM PIM system with 1992 PIM cores to validate performance, scalability, and resource utilization.
- Quantifies performance trade-offs between data movement, computation, and resource utilization across CPU, GPU, and PIM systems.

Experimental results
Research questions
- RQ1Can real PIM systems significantly accelerate GNN inference by offloading memory-intensive aggregation kernels?
- RQ2How can software-level optimizations effectively exploit the unique hardware characteristics of near-bank PIM systems for GNNs?
- RQ3What is the optimal balance between parallelism across PIM clusters, cores, and threads to minimize data movement and maximize compute utilization?
- RQ4How does hybrid CPU-PIM execution compare to CPU-only or GPU-only baselines in terms of end-to-end GNN performance and resource efficiency?
- RQ5What are the practical performance and utilization trade-offs when deploying GNNs on real, commercially available PIM systems?
Key findings
- PyGim achieves an average of 3.04× speedup over a state-of-the-art CPU baseline in end-to-end GNN inference on real PIM hardware.
- The framework achieves 27.01% resource utilization on the UPMEM PIM system for INT32 operations, which is 61.3× higher than that of the GPU baseline.
- For FP32 operations, PyGim achieves 18.54% resource utilization on PIM, 11.8× higher than the GPU, demonstrating superior efficiency despite lower raw throughput.
- The PIM system outperforms the CPU in memory-intensive aggregation tasks, with a 3.07× speedup on average, despite having lower peak compute throughput.
- The hybrid execution model effectively leverages the strengths of both CPU/GPU and PIM, minimizing data movement while maximizing utilization of PIM’s high memory bandwidth.
- PyGim’s multi-level parallelization strategy reduces data transfer overheads while maintaining high compute balance across PIM cores and threads, enabling efficient scaling on real PIM hardware.

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.