QOL improvements to float8 gemm benchmark (#596)
Summary: 1. add more options for shape generation, such as - square: M == K == N sweeping through powers of 2 - sweep: M, K, N each sweeping through powers of 2 - custom: user specifies a single value of M, K, N 2. fix a bug when calling `torch._scaled_mm`, we should create the scales outside the benchmark for a less biased result 3. add sweep over `fast_accum` setting 4. add ability to save result to file, for easy analysis later Test Plan: ``` time python benchmarks/float8/bench_matmul.py --out_filename ~/local/tmp/20240803_f8_gemm_sweep_2.csv --shape_gen_name sweep // result: https://gist.github.com/vkuzo/1d82e84ddd8aac8166695d819ebc8883 ``` Reviewers: Subscribers: Tasks: Tags:
V
Vasiliy Kuznetsov committed
de4a1fb3b1f71e2f61b84dfdc96e7d704ff72208
Parent: 1328787
Committed by GitHub <noreply@github.com>
on 8/5/2024, 8:51:40 PM