Skip to content

saienduri/iree-kernel-benchmark

Repository files navigation

Benchmarking Suite for IREE Kernels

Setup

If you are not using a local iree build, install the iree pip packages:

pip install --find-links https://iree.dev/pip-release-links.html iree-compiler iree-runtime --upgrade

Create a python environment and install the requirements for the project:

python3.11 -m venv bench_venv
source bench_venv/bin/activate
pip install -r requirements.txt
pip install --no-compile --pre --upgrade -e common_tools

Performance

Pick any of the following kernels to test through IREE. Refer to the respective problems.py file in the folder to see which shapes are being tested.

Convolution Benchmarking

python convbench/shark_conv.py

GEMM Benchmarking

python gemmbench/gemm_bench.py

Attention Benchmarking

python attentionbench/attention_bench.py

Roofline

If you want to generate a roofline plot, you can call any of the suites for now with the --roofline option (provide a commma seperated list if you want to generate for multiple benchmarks combined):

python convbench/shark_conv.py --roofline results/iree_conv.csv,results/iree_attention.csv --plot results/attn_conv.png

About

Becnhmark kernels performance through IREE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •