Skip to main content
QUICK REVIEW

[Paper Review] SpArch: Efficient Architecture for Sparse Matrix Multiplication

Zhekai Zhang, Hanrui Wang|arXiv (Cornell University)|Feb 20, 2020
Parallel Computing and Optimization TechniquesComputer Science64 references13 citations
TL;DR

SpArch is a domain-specific accelerator that jointly optimizes input and output data reuse in sparse matrix-matrix multiplication (SpGEMM) using a streaming-based merger, condensed matrix representation, Huffman tree scheduler, and row prefetcher. It reduces DRAM access by 2.8× and achieves up to 1285× speedup and 62× energy efficiency gain over state-of-the-art platforms on 20 real-world benchmarks.

ABSTRACT

Generalized Sparse Matrix-Matrix Multiplication (SpGEMM) is a ubiquitous task in various engineering and scientific applications. However, inner product based SpGENN introduces redundant input fetches for mismatched nonzero operands, while outer product based approach suffers from poor output locality due to numerous partial product matrices. Inefficiency in the reuse of either inputs or outputs data leads to extensive and expensive DRAM access. To address this problem, this paper proposes an efficient sparse matrix multiplication accelerator architecture, SpArch, which jointly optimizes the data locality for both input and output matrices. We first design a highly parallelized streaming-based merger to pipeline the multiply and merge stage of partial matrices so that partial matrices are merged on chip immediately after produced. We then propose a condensed matrix representation that reduces the number of partial matrices by three orders of magnitude and thus reduces DRAM access by 5.4x. We further develop a Huffman tree scheduler to improve the scalability of the merger for larger sparse matrices, which reduces the DRAM access by another 1.8x. We also resolve the increased input matrix read induced by the new representation using a row prefetcher with near-optimal buffer replacement policy, further reducing the DRAM access by 1.5x. Evaluated on 20 benchmarks, SpArch reduces the total DRAM access by 2.8x over previous state-of-the-art. On average, SpArch achieves 4x, 19x, 18x, 17x, 1285x speedup and 6x, 164x, 435x, 307x, 62x energy savings over OuterSPACE, MKL, cuSPARSE, CUSP, and ARM Armadillo, respectively.

Motivation & Objective

  • Address the memory wall in SpGEMM caused by irregular access patterns and poor data locality in sparse matrices.
  • Overcome the limitations of outer product-based SpGEMM, which suffers from poor output reuse due to excessive partial matrix storage in DRAM.
  • Jointly optimize input and output data reuse to reduce DRAM bandwidth and improve performance and energy efficiency.
  • Design a scalable, hardware-optimized architecture that supports large-scale sparse matrices with minimal memory overhead.

Proposed method

  • Propose a streaming-based, highly parallelized merger that pipelines multiply and merge stages, enabling on-chip merging of partial matrices immediately after generation.
  • Introduce a condensed matrix representation that reorganizes the first input matrix to group non-zero elements into denser columns, reducing the number of partial matrices by three orders of magnitude.
  • Design a Huffman tree scheduler to determine an optimal merge order that minimizes total DRAM access by prioritizing merging of sparser partial matrices first.
  • Implement a row prefetcher with a near-optimal buffer replacement policy to reduce input matrix read traffic caused by the condensed representation.
  • Integrate all components into a unified domain-specific architecture (SpArch) that enables high throughput and low memory bandwidth for SpGEMM workloads.
  • Use CSR format for the second matrix and condensed column access for the first, enabling efficient streaming and on-chip data reuse.

Experimental results

Research questions

  • RQ1How can we jointly optimize input and output data reuse in outer product-based SpGEMM to reduce DRAM bandwidth?
  • RQ2What representation and scheduling strategy minimizes partial matrix storage and DRAM access in large-scale SpGEMM?
  • RQ3Can a streaming merger with pipelined multiply-and-merge reduce memory bottlenecks in SpGEMM accelerators?
  • RQ4How effective is a condensed matrix representation in reducing the number of partial matrices without increasing input access?
  • RQ5What is the impact of a Huffman tree-based scheduler on scalability and memory access in SpGEMM with varying matrix sparsity?

Key findings

  • SpArch reduces total DRAM access by 2.8× compared to the previous state-of-the-art across 20 real-world benchmarks.
  • The architecture achieves up to 1285× speedup over ARM Armadillo and 19× speedup over MKL on average.
  • The condensed matrix representation reduces the number of partial matrices by three orders of magnitude, cutting DRAM access by 5.4×.
  • The Huffman tree scheduler further reduces DRAM access by 1.8× by minimizing intermediate storage of partially merged results.
  • The row prefetcher reduces input read traffic by 1.5×, achieving near-optimal buffer replacement for the condensed matrix access pattern.
  • SpArch delivers 6× energy efficiency improvement over OuterSPACE and up to 435× over CUSP on tested workloads.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.