|
@@ -4,14 +4,15 @@ import matplotlib.mlab as mlab
|
|
|
import matplotlib.pyplot as plt
|
|
|
import matplotlib.patches as mpatches
|
|
|
import seaborn
|
|
|
-seaborn.set()
|
|
|
import os
|
|
|
|
|
|
+seaborn.set()
|
|
|
+
|
|
|
# Helper function to attach labels to the bars
|
|
|
def autolabel(subplot, bars):
|
|
|
for bar in bars:
|
|
|
- height = bar.get_height()
|
|
|
- subplot.text(bar.get_x() + bar.get_width()/2., 1.05*height, '%d' % int(height), ha='center', va='bottom')
|
|
|
+ height = round(bar.get_height(), 1)
|
|
|
+ subplot.text(bar.get_x() + bar.get_width()/2., 1.05*height, '%s' % height, ha='center', va='bottom')
|
|
|
|
|
|
# Helper function to strip away the "opencl/" prefix and other stuff from all the names
|
|
|
def stripNames (category, names):
|
|
@@ -33,13 +34,9 @@ averageTotal = {}
|
|
|
stderrTotal = {}
|
|
|
|
|
|
# Import data from file
|
|
|
-averageTotal['cpu'] = np.genfromtxt('results/cpu/average.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
-averageTotal['gpu-primary'] = np.genfromtxt('results/gpu-primary/average.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
-averageTotal['gpu-secondary'] = np.genfromtxt('results/gpu-secondary/average.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
-stderrTotal['cpu'] = np.genfromtxt('results/cpu/stderr.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
-stderrTotal['gpu-primary'] = np.genfromtxt('results/gpu-primary/stderr.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
-stderrTotal['gpu-secondary'] = np.genfromtxt('results/gpu-secondary/stderr.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
-
|
|
|
+for platform in platforms:
|
|
|
+ averageTotal[platform] = np.genfromtxt('results/' + platform + '/average.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
+ stderrTotal[platform] = np.genfromtxt('results/' + platform + '/stderr.csv', dtype=None, delimiter=',', names=['name', 'time', 'power'])
|
|
|
|
|
|
# Create the folder where to store the charts, if it doesn't already exist
|
|
|
if not os.path.exists('charts'):
|