Skip to content

Latest commit

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Theoretical TFLOPS ≠ Real-world Performance

Testing Theoretical Maximum FLOPS on GPUs

This project aims to measure the theoretical maximum FLOPS (Floating Point Operations Per Second) achievable on various GPU models. Please see the original work by Stas Bekman.

Key Features

  1. Median instead of maximum value, each mutliplication is repeated 100 times and we take a median.

  2. Clearing L2 Cache between iterations we are clearing L2 cache on the GPU see the article by SemiAnalysis

  3. Optimized Search: Unlike the original implementation which uses a brute force approach, this version leverages Optuna for efficient parameter optimization.

  4. Visualization: Optuna provides insightful visualizations of the optimization process:

    Optuna Optimization VisualizationOptuna Optimization Visualization

  5. Data Collection: An optional feature allows submitting results to a remote API for data collection and analysis.

Stats

GPU ModelBest Shape (MxNxK)TFLOPS
NVIDIA RTX 4000 SFF Ada Generation2304x5120x153659.0
NVIDIA A10G20480x18112x1971269.7
NVIDIA GeForce RTX 30905248x15040x102478.0
NVIDIA RTX 4000 Ada Generation14464x5312x2048082.7
NVIDIA GeForce RTX 3090 Ti10752x15488x1075286.0
NVIDIA L41024x6016x179291.4
NVIDIA RTX A500017856x17024x358493.9
Tesla V100-SXM2-32GB17216x20480x409694.0
Tesla V100-SXM2-16GB2048x17920x121696.1
Radeon RX 7900 XTX11008x3392x9216113.3
DCU K100_AI9344x3968x6592126.3
NVIDIA RTX A60009856x12480x13248131.2
AMD Instinct MI21017536x7360x2304142.8
NVIDIA L403712x2624x11136170.3
NVIDIA GeForce RTX 409014336x4096x4096178.8
NVIDIA L40S4416x3776x3072252.0
NVIDIA RTX 6000 Ada Generation2624x5632x3328278.5
NVIDIA A100 PCIe2304x5120x1536256.4
NVIDIA A100 SXM6912x16384x2048267.9
NVIDIA H100 NVL*2560x2176x8192488.5
NVIDIA H100 PCIe6912x16384x2048499.5
AMD Instinct MI300X4096x8448x4864788.2
NVIDIA H100 SXM 96GB16896x15680x1024807.1
NVIDIA H100 SXM 80GB6144x17920x2816821.2
NVIDIA GH200 96GB7616x17664x4480852.5
NVIDIA GH200 144G HBM3e7616x17664x4480853.8

*for H100 NVL we are only using a single card as we don't support multi-gpu

Install

# For a faster and smoother installation experience, we recommend using `uv`, an extremely fast Python package installer written in Rust.
# It's a seamless drop-in replacement for pip, so you don't have to worry about compatibility.
# You can easily install it with: pip install uv
git clone https://github.com/mag-/gpu_benchmark
cd gpu_benchmark
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
./mamf-finder.py

TODO:

  • check raw CUDA
  • check tinygrad

Acknowledgements:

Thanks to Bernhard from GPTshop.ai for giving me access to GH200

Special thanks to Stas Bekman for the original implementation and research.

About

Gpu benchmark

Resources

Stars

79 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages