TL;DR
This paper introduces SEXTANS, a novel FPGA-based streaming accelerator designed for general-purpose Sparse-Matrix Dense-Matrix Multiplication (SpMM). SEXTANS tackles the inherent challenges of SpMM by employing hardware flexibility, efficient memory management with HBM, and a PE-aware scheduling mechanism to achieve significant speedups over GPUs.
What Problem Does This Paper Address?
Sparse-Matrix Dense-Matrix Multiplication (SpMM) is a fundamental operation in many fields like scientific computing, graph processing, and deep learning. However, accelerating SpMM presents several key challenges:
- Random Memory Access and Load Imbalance: Sparse matrices have elements distributed randomly, leading to unpredictable memory access patterns and uneven workloads across processing units, causing idle cycles.
- Inefficient Data Handling: Large sparse and dense matrices often exceed on-chip memory capacity, necessitating inefficient data transfers between off-chip memory and processing units.
- Lack of Generality: Existing accelerators are often designed for specific problem sizes or matrix types, requiring costly redesign and re-fabrication for new applications. This is particularly burdensome for FPGA designs, where synthesis and place-and-route can take days.
Methods
SEXTANS proposes a multi-faceted approach to address these challenges:
- Hierarchical Architecture: SEXTANS is built with Processing Engine Groups (PEGs) and Processing Engines (PEs) for parallel computation. It also incorporates dedicated modules for streaming data from High Bandwidth Memory (HBM).
- PE-Aware Non-Zero Scheduling: To combat load imbalance, SEXTANS employs an out-of-order scheduling mechanism. This "PE-aware" approach schedules non-zeros to minimize Read-After-Write (RAW) dependencies, aiming for an Initiation Interval (II) of 1, meaning a new operation can start every cycle.
- Multi-Level Memory Optimizations with HBM: SEXTANS leverages HBM for efficient access to large matrices. It partitions matrices into smaller windows for sequential streaming and uses on-chip memory (URAMs and BRAMs) as scratchpads to reduce random memory accesses.
- Hardware Flexibility (HFlex): This is a key innovation. SEXTANS allows for a single hardware design to support arbitrary SpMM problems. It achieves this by using a pointer list (Q) that directs the processing of scheduled non-zero lists, effectively making the hardware adaptable without requiring re-synthesis. Users can invoke SEXTANS via OpenCL without needing to manage hardware specifics.
Datasets
The evaluation uses a comprehensive set of 1,400 SpMM operations derived from 200 sparse matrices. These matrices are sourced from:
- SNAP (Stanford Large Network Dataset Collection): 50 matrices.
- SuiteSparse Matrix Collection: 150 matrices.
Matrices that were too large to fit within a 5GB memory budget were excluded. The evaluated matrices cover a wide range of sizes, non-zero counts, and densities.
Key Insights and Ideas
- Hardware Flexibility is Crucial for SpMM Acceleration: The paper strongly advocates for "hardware flexibility" as a way to democratize accelerator usage. By designing a single hardware instance that can handle diverse SpMM problems without re-synthesis, SEXTANS significantly reduces development time and cost for end-users.
- PE-Aware Scheduling is Key to Achieving II=1: The proposed PE-aware non-zero scheduling is critical for overcoming the inherent RAW dependencies in SpMM, enabling a highly efficient pipeline with an II=1. This is a significant improvement over traditional scheduling methods that might lead to larger initiation intervals.
- HBM is a Game-Changer for Memory-Bound Workloads: The effective use of HBM is highlighted as essential for handling the large matrices involved in SpMM. SEXTANS demonstrates how to stream data from HBM efficiently, mitigating the bottleneck of off-chip memory access.
- FPGA Accelerators Can Outperform GPUs for Certain Workloads: The results show that SEXTANS, particularly the projected SEXTANS-P, can achieve competitive or superior performance to GPUs like NVIDIA K80 and V100 for SpMM, especially when considering energy efficiency and the overhead associated with GPU kernel launches on smaller problems.
Key Results
- Performance:
- SEXTANS achieves a 2.50x geomean speedup over the NVIDIA K80 GPU.
- The projected SEXTANS-P achieves a 1.14x geomean speedup over the NVIDIA V100 GPU (and 4.94x over K80).
- Energy Efficiency: SEXTANS demonstrates significantly better energy efficiency, with a geomean energy efficiency 6.25x better than K80 and 3.20x better than V100.
- Resource Utilization: The FPGA prototype on a Xilinx U280 board shows high utilization of BRAM and URAM, reflecting the memory-intensive nature of SpMM.
Limitations and Future Work
- Limitations:
- The paper acknowledges that the memory bandwidth utilization of the FPGA implementation is relatively low compared to GPUs, partly due to HLS tool limitations in managing HBM channels.
- The projected SEXTANS-P, while faster, relies on simulation rather than a fully realized hardware prototype.
- Future Work:
- The authors suggest that the HFlex feature can be extended to support other sparse linear algebra operations beyond SpMM.
- Further optimization of HBM access and integration with more advanced HLS tools could lead to even higher performance.
- Exploring different sparse matrix formats and their impact on the accelerator's performance is a potential area for future research.
Summary updated