mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/159044 Approved by: https://github.com/Skylion007 ghstack dependencies: #159043
GenAI Kernel Benchmark
This directory contains benchmarks for the GenAI kernels. It compares pytorch eager, pytorch compiler, quack, and liger.
Setup
Assuming pytorch is installed.
pip install -r requirements.txt
Run
python benchmark.py --list # List all available benchmarks
python benchmark.py --all # Run all benchmarks
python benchmark.py cross_entropy_forward # Run specific benchmark
python benchmark.py softmax_forward softmax_backward # Run multiple benchmarks
Add --visualize
to plot graph for the benchmark results.