summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2018-01-27 20:06:13 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2018-01-27 20:06:13 +0100
commit180532ea398891c2366b8ca6cfcc215208528f2c (patch)
treeb1af592172987ff638ca1b51e3ae8c7a4bd6f31a /scripts
parentada762f66878817d949c25221438b90de448e06d (diff)
Some fixes to the benchmark scripts
Diffstat (limited to 'scripts')
-rw-r--r--scripts/benchmark/benchmark_all.py2
-rw-r--r--scripts/benchmark/plot.py6
-rw-r--r--scripts/benchmark/settings.py18
3 files changed, 13 insertions, 13 deletions
diff --git a/scripts/benchmark/benchmark_all.py b/scripts/benchmark/benchmark_all.py
index 42803614..881d6bc0 100644
--- a/scripts/benchmark/benchmark_all.py
+++ b/scripts/benchmark/benchmark_all.py
@@ -13,7 +13,7 @@ import sys
from benchmark import benchmark_single, COMPARISONS
-BENCHMARKS = ["axpy", "gemv", "gemm", "summary", "axpybatched", "gemmbatched"]
+BENCHMARKS = ["axpy", "gemv", "gemm", "summary", "axpybatched", "gemmbatched", "gemmstridedbatched"]
def parse_arguments(argv):
diff --git a/scripts/benchmark/plot.py b/scripts/benchmark/plot.py
index 66d71595..6337b78f 100644
--- a/scripts/benchmark/plot.py
+++ b/scripts/benchmark/plot.py
@@ -62,10 +62,10 @@ def plot_graphs(results, file_name, num_rows, num_cols,
# Initializes the plot
size_x = plot_size * num_cols
size_y = plot_size * num_rows
+ rcParams.update({'font.size': font_size})
fig, axes = plt.subplots(nrows=num_rows, ncols=num_cols, figsize=(size_x, size_y), facecolor='w', edgecolor='k')
fig.text(.5, 0.92, title, horizontalalignment="center", fontsize=font_size_title)
plt.subplots_adjust(wspace=w_space, hspace=h_space)
- rcParams.update({'font.size': font_size})
# Loops over each subplot
for row in range(num_rows):
@@ -116,10 +116,10 @@ def plot_graphs(results, file_name, num_rows, num_cols,
elif label_names[i] in ["CLBlast FP16"]:
color = PURPLISH
marker = ".-"
- elif label_names[i] in ["clBLAS", "clBLAS FP32"]:
+ elif label_names[i] in ["clBLAS", "clBLAS FP32", "clBLAS (non-batched)"]:
color = REDISH
marker = "x-"
- elif label_names[i] == "cuBLAS":
+ elif label_names[i] in ["cuBLAS", "cuBLAS (non-batched)"]:
color = GREEN
marker = ".-"
ax.plot(x_location, y_list[i], marker, label=label_names[i], color=color)
diff --git a/scripts/benchmark/settings.py b/scripts/benchmark/settings.py
index 7a2df2d6..bf7d3621 100644
--- a/scripts/benchmark/settings.py
+++ b/scripts/benchmark/settings.py
@@ -64,7 +64,7 @@ AXPYBATCHED = {
"benchmarks": [
{
"name": "axpybatched", "num_runs": 10,
- "title": "num batches = 8",
+ "title": "num AXPYs = 8",
"x_label": "sizes (n)", "x_keys": ["n"],
"y_label": "GB/s (higher is better)", "y_key": "GBs",
"arguments": [{"batch_num": 8, "n": n, "incx": 1, "incy": 1, "step": 0, "num_steps": 1}
@@ -72,7 +72,7 @@ AXPYBATCHED = {
},
{
"name": "axpybatched", "num_runs": 5,
- "title": "num batches = 64",
+ "title": "num AXPYs = 64",
"x_label": "sizes (n)", "x_keys": ["n"],
"y_label": "GB/s (higher is better)", "y_key": "GBs",
"arguments": [{"batch_num": 64, "n": n, "incx": 1, "incy": 1, "step": 0, "num_steps": 1}
@@ -81,7 +81,7 @@ AXPYBATCHED = {
{
"name": "axpybatched", "num_runs": 10,
"title": "n=512K",
- "x_label": "num batches (b)", "x_keys": ["batch_num"],
+ "x_label": "num AXPYs", "x_keys": ["batch_num"],
"y_label": "GB/s (higher is better)", "y_key": "GBs",
"arguments": [{"batch_num": b, "n": utils.k(512), "incx": 1, "incy": 1, "step": 1, "num_steps": 1}
for b in utils.powers_of_2(1, 256)],
@@ -222,7 +222,7 @@ GEMMBATCHED = {
"benchmarks": [
{
"name": "gemmbatched", "num_runs": 20,
- "title": "num batches = 8",
+ "title": "num GEMMs = 8",
"x_label": "sizes (m=n=k)", "x_keys": ["m"],
"y_label": "GFLOPS (higher is better)", "y_key": "GFLOPS",
"arguments": [{"batch_num": 8, "m": 32, "n": 32, "k": 32, "layout": 102,
@@ -230,7 +230,7 @@ GEMMBATCHED = {
},
{
"name": "gemmbatched", "num_runs": 10,
- "title": "num batches = 64",
+ "title": "num GEMMs = 64",
"x_label": "sizes (m=n=k)", "x_keys": ["m"],
"y_label": "GFLOPS (higher is better)", "y_key": "GFLOPS",
"arguments": [{"batch_num": 64, "m": 32, "n": 32, "k": 32, "layout": 102,
@@ -239,7 +239,7 @@ GEMMBATCHED = {
{
"name": "gemmbatched", "num_runs": 10,
"title": "m=n=k=128",
- "x_label": "num batches (b)", "x_keys": ["batch_num"],
+ "x_label": "num GEMMs", "x_keys": ["batch_num"],
"y_label": "GFLOPS (higher is better)", "y_key": "GFLOPS",
"arguments": [{"batch_num": b, "m": 128, "n": 128, "k": 128, "layout": 102,
"transA": 111, "transB": 111} for b in utils.powers_of_2(1, utils.k(4))],
@@ -252,7 +252,7 @@ GEMMSTRIDEDBATCHED = {
"benchmarks": [
{
"name": "gemmstridedbatched", "num_runs": 20,
- "title": "num batches = 8",
+ "title": "num GEMMs = 8",
"x_label": "sizes (m=n=k)", "x_keys": ["m"],
"y_label": "GFLOPS (higher is better)", "y_key": "GFLOPS",
"arguments": [{"batch_num": 8, "m": 32, "n": 32, "k": 32, "layout": 102,
@@ -260,7 +260,7 @@ GEMMSTRIDEDBATCHED = {
},
{
"name": "gemmstridedbatched", "num_runs": 10,
- "title": "num batches = 64",
+ "title": "num GEMMs = 64",
"x_label": "sizes (m=n=k)", "x_keys": ["m"],
"y_label": "GFLOPS (higher is better)", "y_key": "GFLOPS",
"arguments": [{"batch_num": 64, "m": 32, "n": 32, "k": 32, "layout": 102,
@@ -269,7 +269,7 @@ GEMMSTRIDEDBATCHED = {
{
"name": "gemmstridedbatched", "num_runs": 10,
"title": "m=n=k=128",
- "x_label": "num batches (b)", "x_keys": ["batch_num"],
+ "x_label": "num GEMMs", "x_keys": ["batch_num"],
"y_label": "GFLOPS (higher is better)", "y_key": "GFLOPS",
"arguments": [{"batch_num": b, "m": 128, "n": 128, "k": 128, "layout": 102,
"transA": 111, "transB": 111} for b in utils.powers_of_2(1, utils.k(4))],