Table of Contents
Fetching ...

SimulatorCoder: DNN Accelerator Simulator Code Generation and Optimization via Large Language Models

Yuhuan Xia, Tun Li, Hongji Zhou, Xianfa Zhou, Chong Chen, Ruiyu Zhang

TL;DR

SimulatorCoder is presented, an agent powered by large language models (LLMs), designed to generate and optimize deep neural network accelerator simulators based on natural language descriptions, highlighting the effectiveness of LLM-based methods in accelerating simulator development.

Abstract

This paper presents SimulatorCoder, an agent powered by large language models (LLMs), designed to generate and optimize deep neural network (DNN) accelerator simulators based on natural language descriptions. By integrating domain-specific prompt engineering including In-Context Learning (ICL), Chain-of-Thought (CoT) reasoning, and a multi-round feedback-verification flow, SimulatorCoder systematically transforms high-level functional requirements into efficient, executable, and architecture-aligned simulator code. Experiments based on the customized SCALE-Sim benchmark demonstrate that structured prompting and feedback mechanisms substantially improve both code generation accuracy and simulator performance. The resulting simulators not only maintain cycle-level fidelity with less than 1% error compared to manually implemented counterparts, but also consistently achieve lower simulation runtimes, highlighting the effectiveness of LLM-based methods in accelerating simulator development. Our code is available at https://github.com/xiayuhuan/SimulatorCoder.

SimulatorCoder: DNN Accelerator Simulator Code Generation and Optimization via Large Language Models

TL;DR

SimulatorCoder is presented, an agent powered by large language models (LLMs), designed to generate and optimize deep neural network accelerator simulators based on natural language descriptions, highlighting the effectiveness of LLM-based methods in accelerating simulator development.

Abstract

This paper presents SimulatorCoder, an agent powered by large language models (LLMs), designed to generate and optimize deep neural network (DNN) accelerator simulators based on natural language descriptions. By integrating domain-specific prompt engineering including In-Context Learning (ICL), Chain-of-Thought (CoT) reasoning, and a multi-round feedback-verification flow, SimulatorCoder systematically transforms high-level functional requirements into efficient, executable, and architecture-aligned simulator code. Experiments based on the customized SCALE-Sim benchmark demonstrate that structured prompting and feedback mechanisms substantially improve both code generation accuracy and simulator performance. The resulting simulators not only maintain cycle-level fidelity with less than 1% error compared to manually implemented counterparts, but also consistently achieve lower simulation runtimes, highlighting the effectiveness of LLM-based methods in accelerating simulator development. Our code is available at https://github.com/xiayuhuan/SimulatorCoder.
Paper Structure (10 sections, 3 figures, 2 tables, 1 algorithm)

This paper contains 10 sections, 3 figures, 2 tables, 1 algorithm.

Figures (3)

  • Figure 1: Overview of the SimulatorCoder framework. The framework consists of two core modules: prompt engineering, which guides the LLM with systematic and domain-specific prompts, and feedback verification, which iteratively refines and validates generated code to ensure functional correctness and efficiency.
  • Figure 2: Examples of domain-specific prompting approaches in SimulatorCoder, including basic (Zero-shot), ICL, CoT, and the integrated ICL and CoT strategy.
  • Figure 3: Runtime comparison between SCALE-Sim and SimulatorCoder.