summaryrefslogtreecommitdiff
path: root/scripts/benchmark/plot.py
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2018-01-14 19:50:27 +0100
committerCedric Nugteren <web@cedricnugteren.nl>2018-01-14 19:50:27 +0100
commitb35e3d1e5326cdc257daa170eb243800616cfc26 (patch)
tree8088a74e204ab9723854f0e70450c9840af85ac6 /scripts/benchmark/plot.py
parent6d52eb2956c294a46b43627c468813cf64f60b99 (diff)
Small improvements to benchmarking for cuBLAS
Diffstat (limited to 'scripts/benchmark/plot.py')
-rw-r--r--scripts/benchmark/plot.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/benchmark/plot.py b/scripts/benchmark/plot.py
index b90a7bf5..06fb278f 100644
--- a/scripts/benchmark/plot.py
+++ b/scripts/benchmark/plot.py
@@ -15,7 +15,8 @@ import matplotlib.pyplot as plt
BLUEISH = [c / 255.0 for c in [71, 101, 177]] # #4765b1
REDISH = [c / 255.0 for c in [214, 117, 104]] # #d67568
PURPLISH = [c / 255.0 for c in [85, 0, 119]] # #550077
-COLORS = [BLUEISH, REDISH, PURPLISH]
+GREEN = [c / 255.0 for c in [144, 224, 98]] # #90e062
+COLORS = [BLUEISH, REDISH, PURPLISH, GREEN]
MARKERS = ["o-", "x-", ".-"]
@@ -86,7 +87,8 @@ def plot_graphs(results, file_name, num_rows, num_cols,
# Sets the y-data
y_list = [[r[y_key] if y_key in r.keys() else 0 for r in result] for y_key in y_keys[index]]
- y_max = max([max(y) for y in y_list])
+ y_max = [max(y) if len(y) else 1 for y in y_list]
+ y_max = max(y_max) if len(y_list) > 0 else 1
# Sets the axes
y_rounding = 10 if y_max < 80 else 50 if y_max < 400 else 200
@@ -106,7 +108,10 @@ def plot_graphs(results, file_name, num_rows, num_cols,
assert len(MARKERS) >= len(y_keys[index])
assert len(label_names) == len(y_keys[index])
for i in range(len(y_keys[index])):
- ax.plot(x_location, y_list[i], MARKERS[i], label=label_names[i], color=COLORS[i])
+ color = COLORS[i]
+ if label_names[i] == "cuBLAS":
+ color = GREEN
+ ax.plot(x_location, y_list[i], MARKERS[i], label=label_names[i], color=color)
# Sets the legend
leg = ax.legend(loc=(0.02, 1.0 - legend_from_top - legend_from_top_per_item * len(y_keys[index])),