When a graph neural network (GNN) takes too long to train, parallelism can spread training work across multiple processors on one machine or across a cluster. Batching makes this practical by splitting data into portions that can be handled separately. Parallelism can reduce execution time, but additional devices take work to set up and configure. section 7.8 section 7.11
For multi-GPU training in PyTorch, two options are:
- DataParallel runs on multiple GPUs in one machine. Replicating the model during each forward pass adds cost, particularly as the model and data grow. section 7.8
- DistributedDataParallel works across GPUs and machines. It uses dedicated CUDA buffers for communication between GPUs and generally has less overhead, making it the preferred option here for larger workloads. section 7.8
Table 7.2 Pros and cons of processor choice
|
Hardware
|
Recommended Workload
|
Pros
|
Cons
|
|---|---|---|---|
|
CPU
|
Preprocessing
|
Suitable for data collection and preprocessing
More affordable than GPUs and TPUs
|
Slower for training due to lack of accelerated parallel processing
|
|
GPU
|
Training
|
Excellent for training due to parallel processing
|
More expensive than CPUs
Surpassed by TPUs for deep learning tasks
|
|
TPU
|
Preprocessing and training
|
Faster computation time and cost-effectiveness for deep learning tasks
|
Requires specific software
infrastructure
Limited to Google platforms
|
|
NPU
|
Training
|
Optimized for deep learning and especially good for on-device AI applications, reducing reliance on cloud services
|
Limited to specific AI workloads, primarily neural network-based tasks
|
|
IPU
|
Training
|
Especially good for graph-based tasks such as GNNs
|
Can be more complex to program and optimize compared to NPUs
|
Compare processor workloads and constraints before choosing hardware: GPUs suit parallel training, while other processors differ in cost, software requirements, and specialization. section 7.4.2
Parallelism is one response to a scaling problem, not a substitute for choosing an efficient GNN architecture or managing memory. If the full graph is too large, sampling and batching can reduce the data handled per iteration; remote backends and graph coarsening address other size constraints, each with its own trade-offs. section 7.3.1





































