TL;DR
AMPED is a novel multi-GPU parallel algorithm designed to accelerate the Matricized Tensor Times Khatri-Rao Product (MTTKRP)—the primary computational bottleneck in sparse tensor decomposition. By utilizing a task-independent tensor sharding strategy that eliminates inter-GPU communication during computation, AMPED scales efficiently to billion-scale datasets, achieving a 5.1× geometric mean speedup over state-of-the-art baselines.
What Problem Does This Paper Address?
Tensors are multi-dimensional arrays used widely in machine learning, signal processing, and network analysis. To extract meaningful features from these massive datasets, researchers rely on tensor decomposition methods like Canonical Polyadic Decomposition (CPD). However, the core operation driving CPD—called MTTKRP—is notoriously slow and memory-intensive.
As real-world datasets scale to billions of nonzero elements, they hit a "memory wall." A single GPU simply does not have enough global memory to hold these massive sparse tensors. While moving to multi-GPU systems seems like an obvious fix, it introduces severe challenges: irregular memory access patterns, workload imbalances across GPU cores, and massive communication overheads when devices attempt to synchronize intermediate results.
Methods
The authors introduce AMPED (Accelerating MTTKRP for Billion-Scale Sparse Tensor Decomposition on Multiple GPUs), which tackles these multi-GPU bottlenecks through a two-tiered partitioning and communication strategy:
- Tensor Sharding (Inter-Device Partitioning): Instead of randomly distributing tensor elements, AMPED groups nonzero elements based on their output mode index. All elements contributing to the same row of the output factor matrix are assigned to the same GPU shard. This clever trick completely eliminates task dependencies and race conditions between different GPUs during the compute phase.
- Inter-Shard Partitioning (Intra-Device Partitioning): Within each GPU, the assigned shard is further divided into equal-sized chunks called Inter-Shard Partitions (ISPs). These are distributed evenly across the GPU's Streaming Multiprocessors (SMs) to ensure perfect internal load balancing.
In terms of hardware execution, the host CPU maintains copies of the input tensor and streams shards to the GPUs on demand. Once a GPU finishes computing its mode, the updated rows of the factor matrix are shared across all devices using a peer-to-peer ring network communication model via GPUDirect P2P, bypassing the slower host CPU entirely.
Datasets
The algorithm was evaluated using four publicly available, large-scale sparse datasets from the FROSTT repository and recommender system benchmarks:
- Amazon: 1.7 Billion nonzeros (Shape: 4.8M × 1.8M × 1.8M)
- Patents: 3.6 Billion nonzeros (Shape: 46 × 239.2K × 239.2K)
- Reddit-2015: 4.7 Billion nonzeros (Shape: 8.2M × 177K × 8.1M)
- Twitch: 0.5 Billion nonzeros (Shape: 15.5M × 6.2M × 783.9K × 6.1K × 6.1K)
Key Insights and Ideas
- Communication Avoidance via Smart Geometry: The defining "aha!" moment of AMPED is that replicating tensor copies on the host CPU to allow index-based sharding pays off massively. By ensuring that a GPU has everything it needs to update its assigned factor matrix rows locally, inter-GPU communication drops to zero during the heavy elementwise computation phase.
- Conquering the Memory Limit via Streaming: Rather than trying to fit a billion-scale tensor into GPU memory all at once, AMPED treats GPU memory as a cache for active shards, allowing it to process datasets that cause state-of-the-art single-GPU frameworks to crash due to Out-Of-Memory (OOM) errors.
- The Pitfall of Naive Balancing: The paper proves that simply dividing nonzeros equally across GPUs is a bad idea. Doing so forces the host CPU to perform expensive merge operations on partial results, creating a massive bottleneck. Sharding by index coordinates is far more effective.
Key Results
AMPED was tested on a single node equipped with an AMD EPYC host CPU and 4 NVIDIA RTX 6000 Ada Generation GPUs.
- Substantial Speedups: AMPED achieved a 5.1× geometric mean speedup in total execution time compared to state-of-the-art baselines like BLCO, MM-CSF, and HiCOO-GPU. Most baselines suffered from runtime errors (OOM) on the largest datasets (Patents and Reddit), whereas AMPED processed them seamlessly.
- Excellent Scalability: The algorithm scales nearly linearly with the number of hardware accelerators, yielding speedups of 1.9×, 2.3×, and 3.3× when scaling from 1 GPU to 2, 3, and 4 GPUs, respectively.
- Partitioning Efficiency: Compared to a naive equal-distribution strategy, AMPED’s index-based partitioning scheme alone delivered a 5.3× to 10.3× speedup in execution time.
Limitations and Future Work
While AMPED excels at scale, it exhibits a limitation on smaller datasets. On the Twitch dataset (the smallest tested, at 0.5B nonzeros), a single-GPU optimized baseline (FLYCOO-GPU) outperformed AMPED by 3.9×. This happens because the tensor is small enough to fit entirely on one GPU, meaning AMPED's multi-GPU communication and synchronization overheads outweigh its parallel processing benefits.
Moving forward, the authors plan to adapt AMPED to more complex, heterogeneous computing environments that mix multiple CPUs, GPUs, and FPGAs to further improve adaptability and performance.
Summary updated