Skip to content
Snippets Groups Projects

Add batch approach for matrix multiplication

Open Mattia Mancini requested to merge multi-matrix-multiply into main
1 file
+ 5
3
Compare changes
  • Side-by-side
  • Inline
+ 5
3
@@ -5,7 +5,7 @@ import seaborn
@@ -5,7 +5,7 @@ import seaborn
import pandas
import pandas
import matplotlib.pyplot as plt
import matplotlib.pyplot as plt
seaborn.set_theme(style="whitegrid")
seaborn.set_theme(style="whitegrid", palette="colorblind")
def parse_args():
def parse_args():
parser = ArgumentParser(description="Combine benchmark metrics from Google Benchmarks Framework")
parser = ArgumentParser(description="Combine benchmark metrics from Google Benchmarks Framework")
@@ -28,7 +28,9 @@ def read_and_combine_json(files, filter):
@@ -28,7 +28,9 @@ def read_and_combine_json(files, filter):
result_normalized["initializer"] = test_name_parts[0]
result_normalized["initializer"] = test_name_parts[0]
result_normalized["method"] = test_name_parts[1]
result_normalized["method"] = test_name_parts[1]
if len(test_name_parts) > 2:
if len(test_name_parts) > 2:
result_normalized["parameters"] = test_name_parts[2:]
result_normalized["parameters"] = "-".join(test_name_parts[2:])
 
else:
 
result_normalized["parameters"] = ""
if filter and not result_normalized["method"].startswith(filter):
if filter and not result_normalized["method"].startswith(filter):
continue
continue
@@ -44,7 +46,7 @@ def store_combined(outfile, obj):
@@ -44,7 +46,7 @@ def store_combined(outfile, obj):
def create_summary_plot(metrics, outplot_name):
def create_summary_plot(metrics, outplot_name):
time_unit = metrics.time_unit[0]
time_unit = metrics.time_unit[0]
grid = seaborn.FacetGrid(metrics, col="architecture")
grid = seaborn.FacetGrid(metrics, col="architecture", row="parameters")
grid.map(seaborn.barplot, "compiler_version", "cpu_time", "name")
grid.map(seaborn.barplot, "compiler_version", "cpu_time", "name")
grid.set_ylabels(f"CPU time({time_unit})")
grid.set_ylabels(f"CPU time({time_unit})")
grid.add_legend()
grid.add_legend()
Loading