From 028d544be890a2f155c8ec5aebbe24e6c6b98a77 Mon Sep 17 00:00:00 2001 From: Alex Baden Date: Thu, 9 Jan 2025 15:25:39 +0000 Subject: [PATCH] fix benchmark filenames --- .github/workflows/triton-benchmarks.yml | 2 +- .../gemm_postop_addmatrix_benchmark.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/triton-benchmarks.yml b/.github/workflows/triton-benchmarks.yml index 1375e948fb..380f32b4ac 100644 --- a/.github/workflows/triton-benchmarks.yml +++ b/.github/workflows/triton-benchmarks.yml @@ -212,7 +212,7 @@ jobs: cd benchmarks/triton_kernels_benchmark python gemm_postop_addmatrix_benchmark.py --reports $REPORTS source ../../scripts/capture-hw-details.sh - python ../../scripts/build_report.py $REPORTS/matmul-performance-postop-addmatrix.csv $REPORTS/gemm-postop-addmatrix-triton-report.csv --benchmark gemm-postop-addmatrix --compiler triton --param_cols "B,M,K,N" --tflops_col Triton-TFlops --hbm_col "Triton-GB/s" --tag $TAG + python ../../scripts/build_report.py $REPORTS/matmul-performance-postop-addmatrix-bfloat16.csv $REPORTS/gemm-postop-addmatrix-bfloat16-triton-report.csv --benchmark gemm-postop-addmatrix --compiler triton --param_cols "B,M,K,N" --tflops_col Triton-TFlops --hbm_col "Triton-GB/s" --tag $TAG - name: Run Triton GEMM + PostOp (add matrix) kernel benchmark int8 if: ${{ steps.install.outcome == 'success' && !cancelled() && !contains(fromJson(inputs.skip_benchmarks || '[]'), 'gemm_postop_addmatrix_benchmark.py') }} diff --git a/benchmarks/triton_kernels_benchmark/gemm_postop_addmatrix_benchmark.py b/benchmarks/triton_kernels_benchmark/gemm_postop_addmatrix_benchmark.py index 7eaa8ccc8f..d20492b968 100644 --- a/benchmarks/triton_kernels_benchmark/gemm_postop_addmatrix_benchmark.py +++ b/benchmarks/triton_kernels_benchmark/gemm_postop_addmatrix_benchmark.py @@ -25,6 +25,14 @@ def dtypes(): return [torch.bfloat16] +def suffix(): + if ALL_DTYPES_OPTION: + return 'all' + if INT8_ONLY_OPTION: + return 'int8' + return 'bfloat16' + + @triton.autotune( configs=[ triton.Config( @@ -259,7 +267,7 @@ def matmul(a, b, d, c): # line styles styles=[('green', '-'), ('green', '--'), ('blue', '-'), ('blue', '--')], ylabel=['GB/s', 'TFlops'], # label name for the y-axis - plot_name='matmul-performance-postop-addmatrix' + '-int8' if INT8_ONLY_OPTION else '', + plot_name='matmul-performance-postop-addmatrix' + '-' + suffix(), # name for the plot. Used also as a file name for saving the plot. args={}, ))