Multi-objective Optimization in CPU Design Space Exploration: Attention is All You Need

Runzhen Xue, Hao Wu, Mingyu Yan, Ziheng Xiao, Xiaochun Ye, Dongrui FanarXiv 2024 · DOI

Abstract

Modern CPU design involves navigating a massive, multi-dimensional space of parameters to optimize for Performance, Power, and Area (PPA). Traditional Design Space Exploration (DSE) methods often struggle with the "curse of dimensionality" and provide little interpretability. This paper introduces AttentionDSE, an end-to-end framework that utilizes Transformer-style attention mechanisms to revolutionize CPU design. By implementing Perception-Driven Attention (PDA) and Attention-aware Bottleneck Analysis (ABA), AttentionDSE achieves a 3.9% improvement in design quality while reducing exploration time by over 80% compared to existing state-of-the-art tools.

Introduction

Designing a modern CPU is a complex balancing act. Architects must select values for hundreds of tunable parameters—such as cache sizes, pipeline widths, and branch predictor types—to meet conflicting PPA goals. This process, known as Design Space Exploration (DSE), faces significant challenges as CPU complexity grows:

  1. The Curse of Dimensionality: Traditional statistical models like Gaussian Processes become slow and inaccurate in high-dimensional spaces.
  2. Inefficient Searching: Current tools often rely on hand-crafted heuristics or exhaustive searches.
  3. The "Black Box" Problem: Existing models rarely provide insights into why a design performs a certain way or identify specific hardware bottlenecks.

Methodology

AttentionDSE addresses these challenges by treating CPU parameters as a sequence and applying attention mechanisms. The framework integrates two primary innovations: Perception-Driven Attention (PDA) and Attention-aware Bottleneck Analysis (ABA).

Overview of the AttentionDSE framework, showing the flow from design space to Pareto frontier via attention-based prediction and bottleneck analysis.

Perception-Driven Attention (PDA)

Standard attention mechanisms exhibit $O(n^2)$ complexity, which is computationally prohibitive for large design spaces. PDA introduces "hardware-aware serialization" to group parameters based on the physical data flow of the CPU (e.g., grouping components within the Fetch stage). By utilizing a sliding window approach, the model focuses on related parameters, reducing complexity to $O(n)$ without sacrificing accuracy.

Hardware-aware micro-architecture serialization process, mapping CPU pipeline stages to a parameter sequence.

Attention-aware Bottleneck Analysis (ABA)

Unlike traditional DSE which separates the surrogate model from the acquisition function, AttentionDSE merges them. ABA utilizes the learned attention weights to identify bottlenecks. If the model assigns high weight to a specific parameter (e.g., ALU count) when predicting suboptimal performance, the system identifies it as a bottleneck and automatically suggests improvements for the next iteration.

Experimental Setup

The framework was evaluated using the industry-standard SPEC CPU2017 benchmark suite. Ground truth data for the Out-of-Order (OoO) CPU design space—containing over $6.89 \times 10^{35}$ configurations—was generated using the GEM5 timing-accurate simulator and the McPAT power/area modeling tool.

Results

AttentionDSE was compared against leading baselines, including BOOMExplorer and ArchExplorer. Key results include:

  • Efficiency: Total exploration time was reduced by over 80%. In the 600.perlbench test, AttentionDSE was 166x faster than ArchExplorer.
  • Design Quality: The framework achieved a 3.9% higher Pareto Hypervolume (PHV), finding designs that were simultaneously faster, smaller, and more power-efficient.
  • Scalability: AttentionDSE maintained high accuracy even as the number of parameters exceeded 200, whereas traditional Gaussian Process Regression (GPR) models saw significant error increases.

Conclusion

AttentionDSE demonstrates that attention mechanisms can serve as active drivers of design rather than just passive predictors. By leveraging hardware locality, the framework outperforms generic black-box models. Future work will address the dependency on simulators like GEM5 and McPAT to bridge the "sim-to-real" gap and explore the generalizability of these bottlenecks to emerging workloads such as AI inference.

Summary updated

BibTeX
@misc{xue2024multi,
  author = {Runzhen Xue and Hao Wu and Mingyu Yan and Ziheng Xiao and Xiaochun Ye and Dongrui Fan},
  title = {{Multi-objective Optimization in CPU Design Space Exploration: Attention is All You Need}},
  year = {2024},
  eprint = {2410.18368},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.18368},
}
Figure