Instructions on using tracer tool for Accel-sim
util/
-
To generate traces for specific individual application:
# example: to run the tracer on hardware device 0 for vecadd app export CUDA_VISIBLE_DEVICES=0 LD_PRELOAD=/home/xu/liu/accel-sim-framework-release/util/tracer_nvbit/tracer_tool/tracer_tool.so ./run
the traces will be found in
traces
folder, This folder will contain:- 1- kernel traces files with
.trace
extension (one file per kernel), e.g.kernel-1.trace
,kernel-2.trace
, etc. - 2-
kernelslist
(one file), this contains the kernel files list that have been traced along with the CUDA memcpy commands - 3-
stats.csv
(one file), this contains the statistcs of the kernels, e.g. how many kernels traced, traced intructions, etc.
Next, you will have to do post processing for the traces. The generated traces above are not structured, we have to group them by thread block Id. To do this, run the following:
/home/xu/liu/accel-sim-framework-release/util/tracer_nvbit/tracer_tool/traces-processing/post-traces-processing ./traces/kernelslist rm ./traces/*.trace cd .. scp -r $1 xu@10.212.67.3:/mnt/data/xu/accel_traces/$2
- 1- kernel traces files with
run
source ./gpu-simulator/setup_environment.sh
./gpu-simulator/bin/release/accel-sim.out -trace ../../accel-sim/accel_traces/backprop/kernelslist.g -config ./gpu-simulator/gpgpu-sim/configs/tested-cfgs/SM86_RTX3070/gpgpusim.config -config ./gpu-simulator/configs/tested-cfgs/SM86_RTX3070/trace.config
.trace files are not required anymore. These are intermediate files and you can delete them to save disk space. Note that the above run_hw_trace.py script do all the steps automatically for you.
这样做的好处是避免让脚本一次性运行所有 bench,导致机器承受不了。