Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Accelerator Runtime Simulator

A lightweight C++17 simulator for ROCm/HIP-style accelerator runtime behavior:

  • tensor allocation with capacity checks and optional hipMalloc/hipFree
  • dependency-aware kernel scheduling
  • synchronization through kernel completion events
  • FIFO and utilization-aware scheduling strategies
  • 10 representative AI workloads and a reproducible utilization benchmark

The simulator models kernels instead of executing their math, so it runs on machines without an AMD GPU. When ROCm is available, tensor allocations can be backed by the real HIP runtime.

Build and run

cmake -S . -B build
cmake --build build --config Release
.\build\Release\accelerator-sim.exe
ctest --test-dir build -C Release --output-on-failure

For single-config generators, the executable is usually .\build\accelerator-sim.exe.

Enable HIP allocations

Install ROCm/HIP, then configure with:

cmake -S . -B build -DAARS_USE_HIP=ON

With this option enabled, every simulated tensor allocation is mirrored by hipMalloc and released with hipFree. Kernel timing remains deterministic so scheduling strategies can be compared reproducibly.

Scheduling model

FIFO executes kernels serially in submission order. The utilization-aware scheduler launches dependency-ready kernels from different workloads concurrently, prioritizing larger compute-unit requests while packing remaining capacity. Utilization is calculated as:

sum(kernel duration x allocated compute units)
------------------------------------------------
accelerator compute units x total makespan

The executable exits with a failure status if the utilization-aware strategy does not improve utilization by at least 25% over FIFO.

About

Lightweight Accelerator Simulator

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages