TL;DR
While weight sparsity can slash theoretical FLOP counts in deep neural networks, translating those savings into real wall-clock speedups on standard GPUs is notoriously difficult without extreme sparsity (>99%). Graphcore researchers introduce PopSparse, a library taking advantage of the Intelligence Processing Unit’s (IPU) fine-grained MIMD architecture and massive on-chip SRAM to accelerate block-sparse matrix multiplication. In half-precision (FP16), PopSparse achieves practical speedups over dense baselines at much more accessible sparsity levels (~88–90%).
What Problem Does This Paper Address?
Pruning weights in deep learning can eliminate 90–95% of model parameters with negligible accuracy loss. However, theoretical efficiency does not equal wall-clock speed. Modern accelerators (like GPUs) thrive on dense, regular matrix multiplications executed across wide SIMD units. Unstructured sparse matrices lead to irregular memory access, poor data reuse, and low hardware arithmetic intensity.
While structured pruning (e.g., block sparsity) can improve memory coalescence, hardware platforms still struggle to execute sparse operations faster than highly optimized dense matrix multiplications, especially in low precision (FP16). The authors set out to determine whether the unique architecture of the IPU—specifically its distributed SRAM, independent tile processing, and ahead-of-time compilation—can bridge this gap and provide meaningful speedups for sparse-dense matrix multiplication (SpMM).
Methods
The authors implement and benchmark PopSparse, targeting square block sizes ($b \in \{1, 4, 8, 16\}$) across two operation modes:
- Static Sparsity: The sparsity mask is known at compile time (ideal for static inference). Poplar's ahead-of-time compiler partitions non-zero blocks across the IPU’s 1,472 tiles to achieve near-perfect load balancing, eliminating communication and index-distribution overhead at runtime.
- Dynamic Sparsity: Only the maximum density is known at compile time; the sparsity pattern updates at runtime (needed for dynamic sparse training). A compile-time planner allocates fixed-capacity memory "buckets" per tile. At runtime, unevenly distributed non-zero values spill over into adjacent tiles, requiring a dynamic exchange-and-propagation phase to complete partial calculations.
PopSparse was benchmarked against dense baselines on a Graphcore Bow IPU, as well as dense (cuBLAS) and sparse (cuSPARSE CSR and BSR) baselines on an NVIDIA A100 GPU.
Datasets
The authors evaluate performance using synthetic microbenchmarks sweeping parameter combinations representative of deep learning workloads:
- Feature dimensions ($m = k$): Powers of two from $256$ to $8192$.
- Batch size ($n$): Swept from $4$ to $65,536$.
- Block size ($b$): $1$ (unstructured), $4$, $8$, and $16$.
- Matrix density ($d$): Dense ($1.0$), $1/4$ (75% sparse), $1/8$ (88%), $1/16$ (94%), and $1/32$ (97%).
- Data types: FP16 and FP32.
(No external domain datasets were used; experiments focus strictly on kernel-level SpMM operations.)
Key Insights and Ideas
- Static beats dynamic: Static sparsity consistently outperforms dynamic sparsity because it eliminates runtime tile imbalances and multi-step data propagation.
- Block size is king: Moving from unstructured ($b=1$) to block size $b=16$ delivers a massive $6.6\times$ throughput boost in static sparse mode. Larger blocks reduce index metadata overhead and let the hardware execute true sub-matrix math rather than fragmented vector ops.
- A lower sparsity threshold: On GPUs, sparse libraries typically require 99%+ sparsity to outperform dense FP16 Tensor Core kernels. On IPUs, static PopSparse outperforms dense FP16 at around 88–90% sparsity when $b \ge 4$.
- Predictive power-law: The authors fit a heuristic model for static sparse speedup over dense FP16: $$\text{Speedup} \approx 0.0013 \cdot m^{0.59} \cdot d^{-0.54} \cdot b^{0.50}$$ A speedup occurs when this value exceeds $1.0$, underscoring that sparse execution thrives with large feature sizes ($m$), coarse blocks ($b$), and low density ($d$).
Key Results
- Speedup over Dense IPU: At $m = k = 4096$, density $d = 1/16$ (94% sparse):
- Static FP16: achieves $1.5\times$ ($b=4$) and $4.9\times$ ($b=16$) speedups over dense FP16.
- Dynamic FP16: achieves parity at $b=4$ ($1.0\times$) and $1.9\times$ at $b=16$.
- FP32: Yields even higher speedups (up to $5.6\times$ for static $b=16$), as FP32 math is computationally heavier, making saved FLOPs more impactful.
- Comparison to GPU Baselines: The standard cuSPARSE Block Sparse Row (BSR) API on NVIDIA GPUs does not support native FP16 compute (falling back to FP32), rendering it slower than dense FP16 even at extreme 98%+ sparsity. IPU static block-sparse FP16 comfortably outperforms these standard GPU sparse baselines across matched densities.
Limitations and Future Work
- Algorithmic gap: While $b=16$ delivers the best hardware speedup, existing pruning literature rarely enforces block sparsity because coarse blocks can degrade model accuracy compared to fine-grained pruning.
- GPU comparisons: The study omits GPU-specific structured formats like NVIDIA’s hardware 2:4 sparsity (
cuSPARSELt) and blocked ELL (which requires row-padding), focusing strictly on standard generalized SpMM comparisons. - End-to-end models: Benchmarks are restricted to isolated SpMM operations. Future work aims to evaluate PopSparse in end-to-end large model inference pipelines to assess system-level speedups and memory footprint reductions.
Summary updated