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.
cmake -S . -B build
cmake --build build --config Release
.\build\Release\accelerator-sim.exe
ctest --test-dir build -C Release --output-on-failureFor single-config generators, the executable is usually
.\build\accelerator-sim.exe.
Install ROCm/HIP, then configure with:
cmake -S . -B build -DAARS_USE_HIP=ONWith 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.
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.