gem5 Co-Pilot: AI Assistant Agent for Architectural Design Space Exploration
Zuoming Fu, Alex Manley, Mohammad Alian
TL;DR
The paper tackles the high cost of architectural design space exploration (DSE) in gem5 by introducing gem5 Co-Pilot, an LLM-powered AI agent that orchestrates design point generation, concurrent simulations, and result interpretation via a state-machine framework. It couples an LLM-driven DSE agent with a Design Space Database (DSDB) and a Streamlit UI to enable Retrieval Augmented Generation (RAG) for rapid, data-informed decision-making, while leveraging the gem5 simulator (SE mode) and McPAT for power/area estimation. The approach demonstrates near-optimal performance within a small number of simulations across multiple cost regimes, significantly reducing exploration time and OpenAI API costs (sub-$0.50 per session) compared to manual DSE. Key contributions include the autonomous, modular DSE agent with automation switching, RR and BP prompt strategies, an ablation study validating critical components, and DSDB-enabled acceleration and Pareto-frontier grounding, offering a scalable workflow for architecture design space exploration. The work has practical impact by enabling fast, cost-efficient exploration of hardware configurations and is extensible to other architectural tools beyond gem5.
Abstract
Generative AI is increasing the productivity of software and hardware development across many application domains. In this work, we utilize the power of Large Language Models (LLMs) to develop a co-pilot agent for assisting gem5 users with automating design space exploration. Computer architecture design space exploration is complex and time-consuming, given that numerous parameter settings and simulation statistics must be analyzed before improving the current design. The emergence of LLMs has significantly accelerated the analysis of long-text data as well as smart decision making, two key functions in a successful design space exploration task. In this project, we first build gem5 Co-Pilot, an AI agent assistant for gem5, which comes with a webpage-GUI for smooth user interaction, agent automation, and result summarization. We also implemented a language for design space exploration, as well as a Design Space Database (DSDB). With DSDB, gem5 Co-Pilot effectively implements a Retrieval Augmented Generation system for gem5 design space exploration. We experiment on cost-constraint optimization with four cost ranges and compare our results with two baseline models. Results show that gem5 Co-Pilot can quickly identify optimal parameters for specific design constraints based on performance and cost, with limited user interaction.
