Skip to content

MiloLurati/AutoTuning_AMD_vs_Nvidia_GPUs

Repository files navigation

Data and Plotting scripts for "Bringing auto-tuning to HIP: Analysis of tuning impact and difficulty on AMD and Nvidia GPUs"

This repository contains the cached GPU tuning data, the Python plotting scripts, and the kernels and kernel scripts for the paper "Bringing auto-tuning to HIP: Analysis of tuning impact and difficulty on AMD and Nvidia GPUs" byMilo Lurati, Stijn Heldens, Alessio Sclocco and Ben van Werkhoven.

The data for all experiments is stored as JSON files where the filenames indicate the GPU model and kernel that was run. The original scripts used to generate the data can be found in cache_scipts. In these scripts the exact search space for the parameters can be easily found.

Installation

The code makes use of the BlooPy Python package. Please ensure the latest version is installed.

pip install bloopy

To re-create the plots requires the seaborn package.

pip install seaborn

lastly we need to install networkx.

pip install networkx

To re-create the cache files you will need Kernel Tuner with HIP.

Running the experiments

For anyone interested in repeating the experiments described in the paper the following describes how to run the experiments.

The main file for running experiments is run_experiments.py. It can be used as follows:

python run_experiments.py

In run_experiments.py by default, there are two lines of code commented out. These lines process the cache files and compute and analyze the FFGs. As these results are included by default in the repository, run_experiments.py will only plot the violin plots and centrality plots and calculate the statistical values of the search spaces.

Plot pagerank centralities

To plot FFGs proportion of PageRank centralities run:

python plot_centralities.py

Creating and plotting FFGs

To create new FFGs, run:

python compute_and_analyze_FFGs.py

By default, the script creates the FFG and computes the PageRank centralities (and saves them). By uncommenting line 180, the script will also draw the graph using networkX and save it as PDF. NOTE: Plotting FFGs is very expensive and may take a lot of RAM and time to plot.

Plot violins and calculate search space statistical values

To plot the violins and calculate the statistical values run:

python violins.py <kernel name>

Give kernel name as argument (convolution, hotspot, dedisp, gemm). For example python violins.py convolution.

Plot Performance Portability

python performance_portability.py

Calculate Top Configurations

python top_configurations.py <kernel name>

Give kernel name as argument (convolution, hotspot, dedisp, gemm).

Citation

@inproceedings{lurati2024bringing,
  title={Bringing Auto-Tuning to HIP: Analysis of Tuning Impact and Difficulty on AMD and Nvidia GPUs},
  author={Lurati, Milo and Heldens, Stijn and Sclocco, Alessio and van Werkhoven, Ben},
  booktitle={European Conference on Parallel Processing},
  pages={91--106},
  year={2024},
  organization={Springer}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •