TL;DR
This paper introduces SparseMap, a novel framework that automates the design of sparse tensor accelerators by jointly optimizing both the hardware's data mapping and its sparse strategy. By employing an evolution strategy with specialized genetic encoding and operators, SparseMap efficiently navigates an enormous design space to find superior accelerator configurations, significantly outperforming existing methods.
What Problem Does This Paper Address?
The increasing prevalence of sparse tensor algebra (SpTA) in machine learning and big data has led to the development of specialized hardware accelerators. However, designing these accelerators is a complex task. Existing approaches often focus on optimizing either the "mapping" (how data is tiled and moved across the hardware) or the "sparse strategy" (how zero elements are handled to save computation and memory). This siloed approach leads to suboptimal designs because mapping and sparse strategies are interdependent. Furthermore, the sheer size of the combined design space (potentially as large as $O(10^{41})$) makes traditional optimization methods like PSO or reinforcement learning inefficient, often getting stuck in vast regions of invalid or poor-performing configurations. SparseMap aims to solve this by providing a unified framework that co-optimizes both aspects and efficiently explores this massive design space.
Methods
SparseMap employs an Evolution Strategy (ES) as its core optimization engine. To tackle the challenges of the vast and complex design space, the authors introduce several key innovations:
- Prime Factors Encoding: Instead of directly encoding tiling parameters, which leads to a huge search space and many invalid combinations, SparseMap decomposes dimension sizes into prime factors. These prime factors are then assigned to different mapping levels, ensuring that all generated designs inherently satisfy dimension tiling constraints and significantly reducing the search space.
- Cantor Encoding: For representing the order of operations (permutations) within mapping levels, Cantor encoding is used. This method ensures that similar gene sequences correspond to similar permutations, allowing the ES to perform more effective local searches.
- High-Sensitivity Hypercube Initialization (HSHI): To address the issue of numerous invalid design points, HSHI identifies "high-sensitivity" design variables that have a disproportionate impact on performance. The initial population is then strategically sampled within hypercubes defined by these sensitive variables, ensuring better coverage of valid and diverse configurations.
- Customized Evolutionary Operators:
- Annealing Mutation: This operator dynamically adjusts mutation probabilities, focusing on high-sensitivity genes early in the search for broader exploration and shifting to low-sensitivity genes later for faster convergence.
- Sensitivity-Aware Crossover: This operator avoids breaking high-sensitivity gene segments during crossover, reducing the likelihood of generating invalid "dead offspring" and improving search efficiency.
These components work together to create a more efficient and effective design space exploration process.
Datasets
The paper does not introduce new datasets for training. Instead, it uses workloads derived from existing benchmarks and real-world applications for evaluation. These include:
- SpConv and SpMM workloads: These represent sparse tensor algebra operations.
- VGG16 network: A pruned version of the VGG16 convolutional neural network is used for SpConv workloads.
- Deepbench and sparseGPT: These are used to derive SpMM workloads, including those relevant to large language models (LLMs).
The evaluation is performed on simulated hardware platforms representing edge, mobile, and cloud environments.
Key Insights and Ideas
- Co-optimization is Crucial: The paper strongly demonstrates that optimizing mapping and sparse strategies jointly is essential for achieving high-performance sparse tensor accelerators. Optimizing them in isolation leads to significantly suboptimal results.
- The Design Space is Vast and Treacherous: The sheer scale of the design space ($O(10^{41})$) and the high proportion of invalid configurations are major hurdles for traditional optimization techniques. This necessitates specialized encoding and search strategies.
- Intelligent Encoding Matters: Moving beyond direct numerical encoding of parameters to methods like prime factor decomposition for tiling and Cantor encoding for permutations dramatically prunes the search space and guides the search more effectively.
- Sensitivity Analysis is Key: Identifying and prioritizing "high-sensitivity" design variables is critical for efficient initialization and focused exploration, preventing wasted effort on less impactful parameters.
- Evolutionary Strategies Can Be Tailored: Standard ES algorithms can be significantly enhanced by custom operators (like annealing mutation and sensitivity-aware crossover) and initialization techniques that specifically address the unique challenges of hardware design space exploration.
Key Results
SparseMap consistently outperforms existing methods across various hardware platforms (edge, mobile, cloud) and workloads.
- EDP Reduction: SparseMap achieves remarkable reductions in Energy-Delay Product (EDP) compared to baseline methods like PSO, MCTS, TBPSA, PPO, and DQN, often by 2-5 orders of magnitude.
- Comparison with State-of-the-Art:
- Compared to SAGE-like (which only optimizes sparse strategies), SparseMap achieves an average EDP reduction of 26.8x (Edge), 19.2x (Mobile), and 171.4x (Cloud).
- Compared to Sparseloop Mapper (which optimizes mapping with a fixed sparse strategy), SparseMap achieves an average EDP reduction of 8.8x (Edge), 4.5x (Mobile), and 158.9x (Cloud).
- Efficiency: The proposed encoding and evolutionary operators significantly improve the efficiency of the search process, leading to more valid design points being explored and better convergence.
Limitations and Future Work
- Search Budget: The paper notes that the chosen search budget (20,000 samples) is based on engineering experience and may need to be dynamically increased for larger design spaces to ensure convergence.
- Generalizability: While the framework is designed to be general, the effectiveness of specific parameters (e.g., the 3/4 threshold for high-sensitivity identification) might require tuning for different accelerator architectures or workloads.
- Future Work: The authors suggest that their framework can be extended to support more complex SpTA workloads and potentially other hardware design optimization problems. The ability to automate the design of SpTA accelerators efficiently opens doors for faster hardware innovation in the rapidly evolving field of AI and big data.
Summary updated