Kernel Benchmark Visualizer is a web-based dashboard for visualizing and analyzing the performance of General Matrix Multiplication (GEMM) kernels. It provides interactive visualizations including a Roofline plot, performance heatmap, and size comparisons of different GEMM kernels.
- Interactive Roofline Plot
- Performance Heatmap
- Kernel Size Comparison Charts
- Filtering by batch size, data type, and model
- Kubernetes-ready deployment
- Python 3.9+
- Docker
- Kubernetes cluster (for deployment)
- kubectl
gemm-kernel-visualizer/
│
├── app/
│ ├── gemm_kernel_visualizer.py
│ └── requirements.txt
│
├── kubernetes/
│ └── deployment.yaml
│
├── Dockerfile
│
└── README.md
-
Clone the repository:
git clone https://github.com/yourusername/gemm-kernel-visualizer.git cd gemm-kernel-visualizer
-
Install the required Python packages:
pip install -r app/requirements.txt
To run the application locally:
-
Navigate to the
app
directory:cd app
-
Run the Python script:
python gemm_kernel_visualizer.py
-
Open a web browser and go to
http://127.0.0.1:8050/
to view the dashboard.
To build the Docker image:
-
Ensure you're in the root directory of the project.
-
Build the image:
docker build -t gemm-kernel-visualizer:latest .
-
Run the container locally (optional):
docker run -p 8050:8050 gemm-kernel-visualizer:latest
To deploy the application to a Kubernetes cluster:
-
Push the Docker image to a container registry:
docker tag gemm-kernel-visualizer:latest your-registry/gemm-kernel-visualizer:latest docker push your-registry/gemm-kernel-visualizer:latest
-
Update the
kubernetes/deployment.yaml
file with your image name. -
Apply the Kubernetes deployment:
kubectl apply -f kubernetes/deployment.yaml
-
Check the deployment status:
kubectl get deployments kubectl get pods kubectl get services
-
Access the application:
- If using Minikube:
minikube service gemm-kernel-visualizer-service
- If using a cloud provider, check the external IP of the LoadBalancer service
- If using Minikube:
To customize the visualizations or add new features:
- Modify the
app/gemm_kernel_visualizer.py
file. - Update the
app/requirements.txt
if you add new dependencies. - Rebuild the Docker image and redeploy if necessary.
The Roofline Plot shows:
- Scatter points representing individual kernels
- X-axis: Arithmetic Intensity (FLOP/byte)
- Y-axis: Performance (TFLOP/s)
- Red line: Roofline model combining memory bandwidth and peak compute limits
Interactivity:
- Hover over points to see kernel details
- Use the toolbar to zoom, pan, or reset the view
The Heatmap displays:
- Kernels on the X-axis
- Performance intensity represented by color
Interactivity:
- Hover over cells to see exact performance values
- Use the color scale to identify high and low performing kernels
The Split Charts show:
-
Arithmetic Intensity Chart:
- X-axis: Kernels
- Y-axis: Arithmetic Intensity (FLOP/byte)
-
Performance Chart:
- X-axis: Kernels
- Y-axis: Performance (TFLOP/s)
Interactivity:
- Hover over bars to see exact values
- Compare arithmetic intensity and performance side-by-side
Use the dropdown menus at the top of the page to filter the data:
- Batch Size
- Data Type (dtype)
- Model
All charts will update automatically based on your selection.
To use your own data:
- Replace the
data
list in the script with your benchmark results. - Adjust the
peak_memory_bandwidth
andpeak_compute
variables in the script to match your hardware specifications.
- If the plots don't render, check your internet connection (Plotly requires internet access for some components).
- For Windows users, if you encounter issues with auto-reloading, modify the last line of the script to:
app.run_server(debug=True, use_reloader=False)
Contributions to improve the visualizer are welcome! Please submit issues and pull requests on our GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.