Skip to content

Commit

Permalink
minor cosmetic changes to the plots
Browse files Browse the repository at this point in the history
  • Loading branch information
lucat1 committed Jun 21, 2024
1 parent 13c4e32 commit 28a4e1f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
18 changes: 9 additions & 9 deletions plotting/plotter1.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
plt.rcParams['ytick.labelsize'] = 18
STYLES = [
# color, marker, offst, name
('dodgerblue', 'D', (-50, 0), "AVX2"),
('deeppink', 'o', (-50, -20), "AVX512"),
('goldenrod', 'h', (-60, -20), "NHWC"),
('brown', '^', (-185, -90), "Tensor Macro"),
('darkcyan', 'H', (-65, -15), "Merged"),
('darkolivegreen', 's', (-90, -100), "Merged+Blocked"),
('dodgerblue', 'D', (-50, 0), "\\textsc{AVX2}", None),
('deeppink', 'o', (-50, -20), "\\textsc{AVX512}", None),
('goldenrod', 'h', (-60, -20), "\\textsc{NHWC}", None),
('brown', '^', (-210, -135), "\\textsc{Tensor Macro}", 26),
('darkcyan', 'H', (-75, -15), "\\textsc{Merged}", None),
('darkolivegreen', 's', (-120, -118), "\\textsc{Merged+Blocked}", None),
]
title = "Increasing Channels - Fully Connected Layers"
title = "\\textbf{Increasing Channels} - \\textbf{Fully Connected Layers}"

conv_types = [conv_type for conv_type in ConvType]
functions = [function_type for function_type in Function]
Expand Down Expand Up @@ -132,11 +132,11 @@ def create_plots(ax: Axes, benchmark_file: Path, main: bool) -> None:
for i, (impl, x, y) in enumerate(zip(impls,x_data,runtime_values)):
if impl == 'data_order_nhwc' or impl == 'best_impl_avx512':
print(impl, y)
color, marker, offst, name = STYLES[i]
color, marker, offst, name, rotation = STYLES[i]
print(f"-- Adding line for {impls[impl]} ({name})")
ax.plot(x, y, label=impls[impl], marker=marker, color=color)
if main:
ax.annotate(name or impls[impl], (x[-1], y[-1]), color=color, xytext=offst, textcoords='offset points', fontsize='x-large')
ax.annotate(name or impls[impl], (x[-1], y[-1]), color=color, xytext=offst, textcoords='offset points', fontsize='x-large', rotation=rotation or 0)
if main:
ax.set_xlabel("Input size [MiB]")
else:
Expand Down
12 changes: 6 additions & 6 deletions plotting/plotter2.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
plt.rcParams['ytick.labelsize'] = 18
STYLES = [
# color, marker, offst, name
('dodgerblue', 'D', (-360, 10), "AVX2", None),
('deeppink', 'o', (-60, -10), "AVX512", None),
('brown', 'h', (-365, -30), "Tensor Macro", 11),
('blueviolet', '^', (-60, -20), "Original", None),
('darkcyan', 'H', (-60, 10), "Merged", None)
('dodgerblue', 'D', (-360, -5), "\\textsc{AVX2}", None),
('deeppink', 'o', (-60, -15), "\\textsc{AVX512}", None),
('brown', 'h', (-318, -19), "\\textsc{Tensor Macro}", None),
('blueviolet', '^', (-60, -20), "\\textsc{Original}", None),
('darkcyan', 'H', (-60, 10), "\\textsc{Merged}", None)
]
title = "Increasing Kernel Size"
title = "\\textbf{Increasing Kernel Size}"

conv_types = [conv_type for conv_type in ConvType]
functions = [function_type for function_type in Function]
Expand Down
12 changes: 6 additions & 6 deletions plotting/plotter3.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
plt.rcParams['ytick.labelsize'] = 18
STYLES = {
# color, marker, offst, name
'best_impl_avx2': ('dodgerblue', 'D', (-60, 10), "AVX2", None),
'best_impl_avx512': ('deeppink', 'o', (-60, -15), "AVX512", None),
'data_order_nhwc_tensor_macro1': ('brown', 'h', (-380, 51), "Tensor Macro", -23),
'original': ('blueviolet', '^', (-190, 5), "Original", None),
't2r_gemmLU': ('darkcyan', 'H', (-45, 10), "Merged", None)
'best_impl_avx2': ('dodgerblue', 'D', (-60, 5), "\\textsc{AVX2}", None),
'best_impl_avx512': ('deeppink', 'o', (-60, -25), "\\textsc{AVX512}", None),
'data_order_nhwc_tensor_macro1': ('brown', 'h', (-380, 43), "\\textsc{Tensor Macro}", -23),
'original': ('blueviolet', '^', (-190, 0), "\\textsc{Original}", None),
't2r_gemmLU': ('darkcyan', 'H', (-45, 10), "\\textsc{Merged}", None)
}
title = "Increasing Stride"
title = "\\textbf{Increasing Stride}"

conv_types = [conv_type for conv_type in ConvType]
functions = [function_type for function_type in Function]
Expand Down

0 comments on commit 28a4e1f

Please sign in to comment.