Introduction
Geometric deep learning, particularly Graph Neural Networks (GNNs), has become a cornerstone for analyzing non-Euclidean data structures such as social networks, molecular graphs, and 3D point clouds. Despite its importance, the software ecosystem remains heavily "CUDA-centric." Dominant libraries like torch-scatter, torch-sparse, and torch-cluster are highly optimized for NVIDIA GPUs, creating a significant barrier for researchers utilizing alternative hardware like Intel Gaudi-v2 Habana Processing Units (HPUs). This paper outlines a roadmap and a comprehensive suite of utilities to enable GNN execution on non-CUDA hardware.
The CUDA-Centric Barrier
The primary challenge in porting GNNs to HPUs lies in the specialized kernels required for graph aggregations. Standard GNN operations involve gathering data from neighboring nodes and aggregating them (e.g., sum, mean, max). These "scatter" operations are typically handled by C++/CUDA extensions that lack native support for Intel's HPU architecture. Without these kernels, standard GNN code fails to execute on non-NVIDIA chips, forcing researchers into a hardware monopoly.
Methodology: Bridging the Functional Gap
To address these limitations, the authors developed several strategies to achieve functional compatibility on Gaudi-v2 HPUs without requiring low-level hardware programming.
Pure PyTorch Re-implementations
The core of the solution involves re-implementing essential scatter operations using standard PyTorch primitives. While these high-level functions may not match the peak performance of custom CUDA kernels, they ensure immediate portability across different hardware backends supported by PyTorch.
Sparse-to-Scatter Transformation
Since torch-sparse is not natively supported on HPUs, the authors introduced a transformation algorithm. This approach converts sparse-dense matrix multiplications into equivalent scatter-based aggregations, allowing models that rely on sparse representations to run on HPUs.
Hybrid CPU-HPU Workflows
For operations like $k$-nearest neighbors ($k$-NN) or METIS partitioning, which are computationally complex and currently unsupported on HPUs, the paper suggests a hybrid approach. These operations are offloaded to the CPU, with the results seamlessly transferred back to the HPU for the remainder of the deep learning pipeline.
Key Insights: Debugging as a Feature
A significant contribution of this work is the systematic documentation of failures. Porting complex models often results in cryptic runtime errors or numerical mismatches. The authors emphasize that documenting these "diagnostic analyses" is as important as the code itself.
By providing detailed logs of issues encountered with torch.compile or specific backpropagation kernels, the project serves as a troubleshooting guide for the community, lowering the "hardware tax" for future developers.
Results and Availability
The project validates these methods across standard GNN benchmarks, 3D point-cloud data (using DGCNN), and various node classification and link prediction tasks. The primary output is a publicly accessible GitHub repository containing:
- 16 Guided Tutorials: Ranging from basic GCN/GAT pipelines to complex embedding functions.
- 11 Real-World Examples: Adapted from official PyTorch Geometric (PyG) benchmarks.
- Diagnostic Documentation: A record of pragmatic workarounds for HPU-specific execution issues.
Conclusion and Future Work
This work provides a foundation for breaking the CUDA monopoly in geometric learning. While the current implementation focuses on functional compatibility—introducing some performance overhead due to high-level re-implementations and manual CPU-HPU data transfers—it enables immediate research on Intel Gaudi-v2 hardware. Future efforts will focus on developing native, low-level HPU kernels to achieve performance parity with CUDA-optimized libraries.
Reference: GitHub Repository: gaudi-geometric-learning
Summary updated