accel-sim / accel-sim-framework

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

Run Simulation on Modern Version of PyTorch in AccelSim #248

Closed wuliJerry closed 1 year ago

wuliJerry commented 1 year ago

Hi there! Thanks for developing the Accelsim framework.

I was wondering how I can run a simulation on a more modern version (compared to the official version of PyTorch provided by the gpgpu-sim team) using AccelSim and GPGPU-Sim.

Based on the relevant context provided by the original repo of GPGPU-Sim, it seems like there are a few PyTorch paths that need to be specified in the environment. Yet, I am not sure about how it works on a recent-published and pre-built version from a package manager (like conda or pip) of PyTorch.

Thanks for your help in advance!

FYI: The docker image provided in the README in this repo is used.

cesar-avalos3 commented 1 year ago

Hello, yes, newer versions of pytorch work in trace mode, both pip and conda-installed work just fine.

238 has a good example of setting up a quick pytorch test (the part where they mention "define-all-apps.yml") and obtaining the traces for it. Apart from this yml configuration file, there is no other configuration or environment variable that needs to be defined.

wuliJerry commented 1 year ago

Hi there! Thanks for your reply!

In this thread, they mentioned CUDA_INJECTION64_PATH and LD_PRELOAD. Do I need to manually specify these two variables for my Pytorch script?

cesar-avalos3 commented 1 year ago

Hello, the "run_hw_trace.py" script sets those up for you.

wuliJerry commented 1 year ago

Thanks, that works for me!