Skip to content

Commit

Permalink
Compare performance across Blast commits
Browse files Browse the repository at this point in the history
  • Loading branch information
roversch committed Aug 6, 2024
1 parent 9ac7b62 commit 84c8c58
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
25 changes: 13 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ ${BENCH_DATA}/sgemm-blaze-static.json: $(BENCH_BLAZE)
$(BENCH_BLAZE) --benchmark_filter="BM_gemm_static<float>*" $(BENCHMARK_OPTIONS) \
--benchmark_out=${BENCH_DATA}/sgemm-blaze-static.json

${BENCH_DATA}/dgemm-blast-static-panel.json: $(BENCH_BLAST)
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-static-panel.json: $(BENCH_BLAST)
$(BENCH_BLAST) --benchmark_filter="BM_gemm_static_panel<double, .+>" $(BENCHMARK_OPTIONS) \
--benchmark_out=${BENCH_DATA}/dgemm-blast-static-panel.json
--benchmark_out=${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-static-panel.json

${BENCH_DATA}/dgemm-blast-dynamic-panel.json: $(BENCH_BLAST)
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-dynamic-panel.json: $(BENCH_BLAST)
$(BENCH_BLAST) --benchmark_filter="BM_gemm_dynamic_panel<double>" $(BENCHMARK_OPTIONS) \
--benchmark_out=${BENCH_DATA}/dgemm-blast-dynamic-panel.json
--benchmark_out=${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-dynamic-panel.json

${BENCH_DATA}/dgemm-blast-static-plain.json: $(BENCH_BLAST)
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-static-plain.json: $(BENCH_BLAST)
$(BENCH_BLAST) --benchmark_filter="BM_gemm_static_plain<double, .+>" $(BENCHMARK_OPTIONS) \
--benchmark_out=${BENCH_DATA}/dgemm-blast-static-plain.json
--benchmark_out=${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-static-plain.json

${BENCH_DATA}/dgemm-blast-dynamic-plain.json: $(BENCH_BLAST)
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-dynamic-plain.json: $(BENCH_BLAST)
$(BENCH_BLAST) --benchmark_filter="BM_gemm_dynamic_plain<double>" $(BENCHMARK_OPTIONS) \
--benchmark_out=${BENCH_DATA}/dgemm-blast-dynamic-plain.json
--benchmark_out=${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-dynamic-plain.json

${BENCH_DATA}/sgemm-blast-static-panel.json: $(BENCH_BLAST)
$(BENCH_BLAST) --benchmark_filter="BM_gemm_static_panel<float, .+>" $(BENCHMARK_OPTIONS) \
Expand All @@ -94,16 +94,17 @@ ${BENCH_DATA}/sgemm-libxsmm.json: $(BENCH_LIBXSMM)
--benchmark_out=${BENCH_DATA}/sgemm-libxsmm.json

dgemm-benchmarks: \
$(shell mkdir -p ${BENCH_DATA}/$(shell git rev-parse --short HEAD)) \
${BENCH_DATA}/dgemm-openblas.json \
${BENCH_DATA}/dgemm-mkl.json \
${BENCH_DATA}/dgemm-libxsmm.json \
${BENCH_DATA}/dgemm-blasfeo.json \
${BENCH_DATA}/dgemm-blaze-static.json \
${BENCH_DATA}/dgemm-eigen-static.json \
${BENCH_DATA}/dgemm-blast-static-panel.json \
${BENCH_DATA}/dgemm-blast-dynamic-panel.json \
${BENCH_DATA}/dgemm-blast-static-plain.json \
${BENCH_DATA}/dgemm-blast-dynamic-plain.json
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-static-panel.json \
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-dynamic-panel.json \
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-static-plain.json \
${BENCH_DATA}/$(shell git rev-parse --short HEAD)/dgemm-blast-dynamic-plain.json


#
Expand Down
20 changes: 11 additions & 9 deletions bench/analysis/dgemm_performance.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import matplotlib.pyplot as plt
import json

import glob
import pathlib

def filter_aggregate(benchmarks, name):
result = []
Expand All @@ -22,20 +23,21 @@ def filter_aggregate(benchmarks, name):

plots = [
# {'data_file': 'dgemm-openblas.json', 'label': 'OpenBLAS'},
{'data_file': 'dgemm-mkl.json', 'label': 'MKL'},
{'data_file': 'dgemm-blasfeo.json', 'label': 'BLASFEO'},
# {'data_file': 'dgemm-mkl.json', 'label': 'MKL'},
# {'data_file': 'dgemm-blasfeo.json', 'label': 'BLASFEO'},
# {'data_file': 'dgemm-blasfeo-blas.json', 'label': 'BLASFEO*'},
{'data_file': 'dgemm-libxsmm.json', 'label': 'LIBXSMM'},
# {'data_file': 'dgemm-libxsmm.json', 'label': 'LIBXSMM'},
# {'data_file': 'dgemm-eigen-dynamic.json', 'label': 'Eigen (D)'},
# {'data_file': 'dgemm-eigen-static.json', 'label': 'Eigen (S)'},
# {'data_file': 'dgemm-blaze-dynamic.json', 'label': 'Blaze (D)'},
{'data_file': 'dgemm-blaze-static.json', 'label': 'Blaze (S)'},
{'data_file': 'dgemm-blast-static-panel.json', 'label': 'BLAST (SP)'},
{'data_file': 'dgemm-blast-static-plain.json', 'label': 'BLAST (SD)'},
{'data_file': 'dgemm-blast-dynamic-panel.json', 'label': 'BLAST (DP)'},
{'data_file': 'dgemm-blast-dynamic-plain.json', 'label': 'BLAST (DD)'},
# {'data_file': 'dgemm-blaze-static.json', 'label': 'Blaze (S)'},
]

for benchmark_file, benchmark_label in [('dgemm-blast-static-panel.json', 'SP'), ('dgemm-blast-static-plain.json', 'SD'), ('dgemm-blast-dynamic-panel.json', 'DP'), ('dgemm-blast-dynamic-plain.json', 'DD')]:
files = glob.glob('./**/' + benchmark_file, recursive=True, root_dir='bench_result/data')
for file in files:
plots.append({'data_file': file, 'label': f'BLAST ({benchmark_label}) {pathlib.Path(file).parent.stem}'})

fig = plt.figure(figsize=[10, 6])
ax = fig.subplots()

Expand Down

0 comments on commit 84c8c58

Please sign in to comment.