Abstract
Deep Neural Network (DNN) accelerator design requires simultaneous optimization of hardware architecture and data mapping strategies. Traditionally, these spaces are explored independently, leading to sub-optimal designs due to the complex cross-coupling between hardware resources and mapping choices. We present DiGamma ($\digamma$), a domain-aware genetic algorithm that utilizes a unified hierarchical encoding and specialized genetic operators to navigate an astronomical $O(10^{36})$ search space. DiGamma achieves up to 10x speedup over state-of-the-art optimization baselines across diverse vision, language, and recommendation workloads in both edge and cloud resource constraints.
Introduction
The efficiency of a DNN accelerator is determined by the synergy between its physical hardware configuration (e.g., number of processing elements, buffer sizes) and its mapping strategy (e.g., tiling, loop ordering, parallelism). Optimizing these two domains in isolation often results in missed opportunities for performance gains because the ideal hardware depends on the mapping, and vice versa. However, the combined search space is prohibitively large, estimated at $O(10^{36})$, making brute-force or decoupled search methods impractical.
The Co-optimization Challenge
The "cross-coupled" nature of hardware and mapping means that a change in one domain necessitates a re-evaluation of the other. For instance, increasing the number of processing elements (PEs) might improve parallelism but could lead to buffer under-utilization if the tiling strategy isn't adjusted. Standard optimization algorithms often struggle with this high-dimensional, non-convex space, frequently getting trapped in local optima or failing to find valid solutions within strict area and power budgets.
The DiGamma Approach
To address these challenges, the authors propose the Co-opt Framework powered by the DiGamma algorithm. DiGamma introduces several key innovations:
Unified Hierarchical Encoding
Instead of treating hardware and mapping as independent lists, DiGamma employs a hierarchical "gene" representation. As shown in Figure 2, a single individual in the genetic algorithm encodes both hardware parameters (like PE array dimensions $\pi_{L1}, \pi_{L2}$) and mapping parameters (tile sizes, loop orders, and parallelism) across multiple memory hierarchy levels. This structure ensures that physical interactions between hardware and software are captured within the optimization process.
Domain-Aware Genetic Operators
Unlike standard genetic algorithms that rely on random mutations, DiGamma uses specialized operators such as Mutate-HW and Mutate-Map. These operators are "aware" of hardware constraints. For example, if a mutation alters the PE array size, the algorithm can automatically rebalance buffer allocations to maintain high utilization while staying within the total area budget. This domain knowledge significantly accelerates convergence.
Flattened Optimization and Evaluation
DiGamma avoids the traditional "two-loop" optimization approach, where an outer loop explores hardware and an inner loop searches for mappings. Instead, it searches the entire combined space simultaneously. To evaluate candidates quickly, the framework integrates MAESTRO, an analytical cost model that provides rapid estimates of latency, area, and energy.
Experimental Evaluation
The framework was tested against seven popular DNN models:
- Vision: MobileNetV2, ResNet18, ResNet50, Mnasnet.
- Language: BERT.
- Recommendation: DLRM, NCF.
Evaluations were conducted under two resource scenarios: Edge (0.2 $mm^2$ area budget) and Cloud (7.0 $mm^2$ area budget).
Key Results and Insights
DiGamma consistently outperformed both general-purpose optimizers and decoupled search strategies.
Performance Gains
As illustrated in Figure 5, DiGamma achieved significant latency reductions. Compared to state-of-the-art baselines like CMA-ES, DiGamma delivered a geometric mean speedup of 3.0x in edge settings and 10.0x in cloud settings. Even when compared to sophisticated decoupled optimization methods, DiGamma remained 1.25x to 2.0x faster, highlighting the benefits of simultaneous co-optimization.
Search Efficiency and Stability
DiGamma reached optimized solutions within a budget of 40,000 samples (approximately 20 minutes of CPU time), whereas naive searches would require millions of samples. Furthermore, while general optimizers often failed to find valid designs for complex models like BERT or NCF within tight area constraints, DiGamma's domain-aware nature allowed it to consistently identify high-performance, valid design points.
Conclusion and Future Work
DiGamma demonstrates that a domain-aware, unified approach to hardware-mapping co-optimization is essential for designing next-generation DNN accelerators. By linking hardware and mapping parameters in a single genome, the algorithm effectively navigates massive search spaces to find non-intuitive, high-performance configurations.
Future work includes expanding the cost model to include more complex components like Networks-on-Chip (NoCs) and control logic, exploring multi-tenant workloads where an accelerator must support multiple models simultaneously, and extending the hierarchy to support more complex memory systems like HBM.
Summary updated