accel-sim / accel-sim-framework

This is the top-level repository for the Accel-Sim framework.
https://accel-sim.github.io
Other
307 stars 117 forks source link

CMake support, and a Python frontend #294

Closed JRPan closed 7 months ago

JRPan commented 7 months ago
  1. Support of CMake. (Makefile still works)
  2. Added a Simple Python Frontend using pybind11
  3. Put the framework into a class (accel-sim.cc), to support both a c++ frontend and a python frontend

C++:

int main(int argc, const char **argv) {
  accel_sim_framework accel_sim(argc, argv);
  accel_sim.simulation_loop();

  // we print this message to inform the gpgpu-simulation stats_collect script
  // that we are done
  printf("GPGPU-Sim: *** simulation thread exiting ***\n");
  printf("GPGPU-Sim: *** exit detected ***\n");
  fflush(stdout);

  return 0;
}

Python3:

import accel_sim

accel_sim_instance = accel_sim.accel_sim_framework('gpgpusim.config', 'kernelslist.g')
accel_sim_instance.simulation_loop()

print("GPGPU-Sim: *** simulation thread exiting ***")
print("GPGPU-Sim: *** exit detected ***")