- The folder 'llvm' contains LLVM 15 and our passes.
- The header file 'penguin.h' contains our runtime components.
- The folder 'eval' contains workloads.
- The fodler open-gpu-kernel-modules contains the UVM driver.
- The script compile.sh compiles everything
- The script run.sh runs everything.
Please install prerequisites as mentioned in LLVM website.
cd llvm
mkdir build
cmake -S llvm -B build -G Ninja -DLLVM_ENABLE_PROJECTS='clang' -DLLVM_ENABLE_BACKENDS='x86;nvptx' -DCMAKE_BUILD_TYPE='Debug'
cd bulid
ninja
Compiling LLVM can take between 20 minutes to 2 hours, depending on the amount of compute and memory available. In machines with limted memory, the linking process may fail initially (due to out of memory). Please run ninja again if this happens.
From the top-level folder,
cd open-gpu-kernel-modules
make modules -j
sudo rmmod nvidia_uvm
sudo rmmod nvidia
sudo insmod /home/pratheek/projects/accesscounter/open-gpu-kernel-modules/kernel-open/nvidia.ko NVreg_OpenRmEnableUnsupportedGpus=1
sudo insmod /home/pratheek/projects/accesscounter/open-gpu-kernel-modules/kernel-open/nvidia-uvm.ko
Edit the startup.sh file to point the bin directory in LLVM. Source the startup.sh file add the LLVM binaries into the path.
Run the provided compile.sh script to compile all the workloads for all the configurations. The script internally calls other scripts to set various memory reservation amounts in the main.cu file of each workload.
Use the provided run.sh to run all the compiled binaries and generate .txt for the primary graph. Use the provided parse.sh script to parse the output of the workloads into a csv file.
SUV's passes are located in llvm/llvm/lib/Transforms/CudaAnalysis and llvm/llvm/lib/Transforms/DynamicHostTransform. The runtime components (SUV's default policies) are located in the header file penguin-suv.h.