03 - Adding a Profiler
In this tutorial, we will extend the previous workflow to obtain performance metrics.
Step 1: Profiling with Perf
Running a profiler is as simple as adding a new parameter in .daisy/benchmark.yml
. The workflows support various profilers. For the scope of the tutorial, we choose perf.
on: push: branches: - main
parameters: timeout: 15 partitions: - bellis4
steps: build: | # Update and install dependencies sudo apt-get update sudo apt-get install -y build-essential
# Compile the benchmark gcc -O2 matmul.c -o matmul.out
run: matmul: command: ./matmul.out measurements: 1 profiler: perf
After pushing your changes, Daisytuner will automatically execute the updated workflow. Our dashboard previews the resulting Flame Graph for multiple threads. For a more detailed view, you can also export the speedscope data and use a visualizer of your choice!
Step 2: Hardware Utilization
The metrics
parameter allows you to easily obtain performance metrics that reflect the hardware utilization of your benchmark.
run: matmul: command: ./matmul.out measurements: 1 profiler: perf metrics: - flops_dp - memory_bandwidth
The Dashboard now shows measurements for the requested metrics on top of the page:
Happy benchmarking! 🎉