Add script to make graphs from problem size sweeps
Simplify creating graphs from problem size sweeps
Add a script that can create graphs from the output of our problem size sweep script.
- This PR is a feature
- It does the following:
- Adds graphing script at the request of people who like graphs
Example workflow
Collecting data with sweep_size.sh
The sweep_size.sh script lets you run the perf suite and collect data into a file layout that the plotting script expects.
Here is an example invocation that I made on rzvernal, an ElCap early access machine with 8 gpus per node. This sweep ran with problem sizes 1024, 2048, …, 83886008 and output to a rzvernal_4.5.2 directory because I was testing the rocm 4.5.2 compiler. The arguments after – are passed directly to raja perf, I excluded the ATOMIC and INDEXLIST kernels due to long runtimes.
salloc -N1 -t480 ../scripts/sweep_size.sh -x rzvernal_4.5.2 "srun -n8 $(pwd)/bin/raja-perf.exe" --size-min 1024 --size-max 10000000 --size-ratio 2 -- --npasses 4 --npasses-combiners Minimum Average Maximum -ek PI_ATOMIC INDEXLIST -sp
Plotting data with sweep_graph.py
The sweep_graph.py script lets you graph the data collected by sweep_size.sh.
Here is an example of making line graphs of bandwidth vs problem size for every kernel.
../../../scripts/sweep_graph.py ../../rzvernal ../../rzansel -slg "bandwidth(GB/s)" -o graph_bandwidth
Here is an example of making a bar graph of bandwidth for all kernels and variants at the 8M problem size. Here the max operator us used to pick the max bandwidth of all tunings, collapsing out the tuning dimension.
../../../scripts/sweep_graph.py ../../rzvernal ../../rzansel -bg "max<bandwidth(GB/s)[run_size::8388608],tuning_index>" -o graph_bandwidth
Here is an example of making a bar graph of speedup for all kernels and variants at the 8M problem size vs the RAJA_CUDA variant on rzansel. The min here is used to pick the min runtime of all tunings, collapsing out the tuning dimension.
../../../scripts/sweep_graph.py ../../rzvernal ../../rzansel -bg "div<min<time(s)[run_size::8388608],tuning_index>[sweep_dir_name::rzansel][variant_index::RAJA_CUDA],min<time(s)[run_size::8388608],tuning_index>>" -ev Lambda_HIP Lambda_CUDA -ek Basic_INDEXLIST -o graph_speedup
YES! If its ready do you want to mark it ready for review?
There are still some rough edges in this script and I want to add some more comments.