This commit is contained in:
Carl Pearson
2017-05-05 06:41:38 -05:00
parent 6edd1b3635
commit 61e6ba7499
8 changed files with 51 additions and 65 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 182 KiB

View File

@@ -1,40 +1,60 @@
import numpy as np import numpy as np
import seaborn as sns import seaborn as sns
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
sns.set(style="white", context="talk") sns.set(style="white", context="talk")
plt.rcdefaults() plt.rcdefaults()
DPI=600 DPI=600
def autolabel(ax, rect):
"""
Attach a text label above each bar displaying its height
"""
height = rect.get_height()
ax.text(rect.get_x() + rect.get_width()/2., 1.05*height,
'%d' % int(height),
ha='center', va='bottom')
path = 'figures/cpu_matvec' path = 'figures/cpu_matvec'
fig, ax = plt.subplots() fig, ax = plt.subplots()
systems = ('BW (32T)', "Minsky (160T)") systems = ('BW (32T)', "Minsky (160T)")
mlfmm = (8.65e4, 4.84e4) mlfmm = (8.65e4, 4.84e4)
total = (1.2e5, 5.77e4) total = (1.2e5, 5.77e4)
x_pos = np.arange(len(systems)) x_pos = np.arange(len(systems))
ax.bar(x_pos, mlfmm, color='gray')
ax.bar(x_pos, [i-j for i,j in zip(total, mlfmm)], color='lightgray', bottom=mlfmm ) ax.bar(x_pos, mlfmm, color='darkgray', label='MLFMM')
ax.bar(x_pos, [i-j for i,j in zip(total, mlfmm)], color='lightgray', bottom=mlfmm, label='Other Operations')
ax.set_xticks(x_pos) ax.set_xticks(x_pos)
ax.set_xticklabels(systems) ax.set_xticklabels(systems)
ax.set_ylabel("Execution Time (ms)") ax.set_ylabel("Execution Time (ms)")
# ax.set_title('How fast do you want to go today?') handles, labels = ax.get_legend_handles_labels()
ax.legend(handles, labels)
plt.savefig(path+'.pdf') plt.savefig(path+'.pdf')
plt.savefig(path+'.png', dpi=DPI) plt.savefig(path+'.png', dpi=DPI)
print path print path
path='figures/mlfmm_bw' path='figures/mlfmm_bw'
width=0.25 width=0.33
fig, ax = plt.subplots() fig, ax = plt.subplots()
systems = ('1T', "32T", "1 GPU" ,"4 GPU", "16 GPU") systems = ('1T', "32T", "1 GPU" ,"4 GPU", "16 GPU")
mlfmm = (1.50e6, 8.64e4, 2.78e4, 7.01e3, 1.89e3) mlfmm = (1.50e6, 8.64e4, 2.78e4, 7.01e3, 1.89e3)
num = (45,45,45,45,47) num = (45,45,45,45,47)
x_pos = np.arange(len(systems)) x_pos = np.arange(len(systems))
ax.bar([p-width/2 for p in x_pos], [i/j for i,j in zip(mlfmm,num)], color='darkgray', log=True, width=0.25) rects = ax.bar([p-width/2 for p in x_pos], [i/j for i,j in zip(mlfmm,num)], color='darkgray', log=True, width=width)
autolabel(ax, rects[0])
autolabel(ax, rects[1])
autolabel(ax, rects[2])
autolabel(ax, rects[3])
autolabel(ax, rects[4])
ax.set_ylim(1,8e4)
ax2=ax.twinx() ax2=ax.twinx()
ax2.bar([p+width/2 for p in x_pos], [mlfmm[0] / i for i in mlfmm], color='lightgray', log=True, width=0.25) rects = ax2.bar([p+width/2 for p in x_pos], [mlfmm[0] / i for i in mlfmm], color='lightgray', log=True, width=width)
autolabel(ax2, rects[1])
autolabel(ax2, rects[2])
autolabel(ax2, rects[3])
autolabel(ax2, rects[4])
ax2.set_ylim(1,1.5e3)
ax.set_xticks(x_pos) ax.set_xticks(x_pos)
ax.set_xticklabels(systems) ax.set_xticklabels(systems)
ax.set_ylabel("Per-MLFMM Execution Time (ms)") ax.set_ylabel("Per-MLFMM Execution Time (ms)")
@@ -43,73 +63,37 @@ plt.savefig(path+'.pdf')
plt.savefig(path+'.png', dpi=DPI) plt.savefig(path+'.png', dpi=DPI)
print path print path
path="figures/mlfmm_minsky" path="figures/mlfmm_minsky"
# fig, ax = plt.subplots() width = 0.33
# systems = ('1T', "160T", "1 GPU" ,"4 GPU")
# mlfmm = (1.25e6, 4.71e4, 5.22e3, 1.29e3)
# num = (44,44,44,44)
# x_pos = np.arange(len(systems))
# ax.bar(x_pos, [i/j for i,j in zip(mlfmm,num)], color='gray', log=True)
# ax.set_xticks(x_pos)
# ax.set_xticklabels(systems)
# ax.set_ylabel("Per-MLFMM Execution Time (ms)")
# plt.ylim([1, 1e5])
# # ax.set_title('How fast do you want to go today?')
# plt.savefig(path+'.pdf')
# plt.savefig(path+'.png', dpi=DPI)
# print path
# fig, ax = plt.subplots()
# systems = ('1T', "160T", "1 GPU" ,"4 GPU")
# mlfmm = [1.25e6, 4.71e4, 5.22e3, 1.29e3]
# num = (44,44,44,44)
# x_pos = [0,1,2,3]
# sns.barplot(x_pos + x_pos,
# [i/j for i, j in zip(mlfmm,num)] + [mlfmm[0] / i for i in mlfmm],
# ["Time", "Time", "Time", "Time", "Speedup", "Speedup", "Speedup", "Speedup"],
# palette="BuGn_d", ax=ax, log=True)
width = 10
fig, ax = plt.subplots() fig, ax = plt.subplots()
systems = ('1T', "160T", "1 GPU" ,"4 GPU") systems = ('1T', "160T", "1 GPU" ,"4 GPU")
mlfmm = [1.25e6, 4.84e4, 5.22e3, 1.29e3] mlfmm = [1.25e6, 4.84e4, 5.22e3, 1.29e3]
num = (44,44,44,44) num = (44,44,44,44)
x_pos = [0,1,2,3] x_pos = np.arange(len(systems))
sns.barplot(x_pos, rects = ax.bar([p-width/2 for p in x_pos], [i/j for i,j in zip(mlfmm,num)], color='darkgray', log=True, width=width)
[i/j for i, j in zip(mlfmm,num)], autolabel(ax, rects[0])
color="DarkGray", ax=ax, log=True) autolabel(ax, rects[1])
ax.set_ylabel("Per-MLFMM Execution Time (ms)") autolabel(ax, rects[2])
autolabel(ax, rects[3])
ax2 = ax.twinx() ax.set_ylim(1,8e4)
# ax2.set_ylim((0,300)) ax2=ax.twinx()
sns.barplot(x_pos, rects = ax2.bar([p+width/2 for p in x_pos], [mlfmm[0] / i for i in mlfmm], color='lightgray', log=True, width=width)
[mlfmm[0] / i for i in mlfmm], autolabel(ax2, rects[1])
color="LightGray", ax=ax2, log=True) autolabel(ax2, rects[2])
ax2.set_ylabel("Speedup over 1T") autolabel(ax2, rects[3])
ax2.set_ylim(1,1.5e3)
new_width = 0.25
for bar in ax.patches:
center = bar.get_x() + bar.get_width() / 2
bar.set_width(new_width)
bar.set_x(center - new_width)
for bar in ax2.patches:
center = bar.get_x() + bar.get_width() / 2
bar.set_width(new_width)
bar.set_x(center)
ax.set_xticks(x_pos) ax.set_xticks(x_pos)
ax.set_xticklabels(systems) ax.set_xticklabels(systems)
ax.set_ylabel("Per-MLFMM Execution Time (ms)")
# plt.ylim([1, 1e5]) ax2.set_ylabel("Speedup over 1T")
# ax.set_title('How fast do you want to go today?')
plt.savefig(path+'.pdf') plt.savefig(path+'.pdf')
plt.savefig(path+'.png', dpi=DPI) plt.savefig(path+'.png', dpi=DPI)
print path print path
fig, ax = plt.subplots() fig, ax = plt.subplots()
systems = ['BW 32T', "Minsky 160T", "BW 4 GPU" ,"Minsky 4 GPU"] systems = ['BW 32T', "Minsky 160T", "BW 4 GPU" ,"Minsky 4 GPU"]
p2m = (127.10, 72.10749, 7.73, 1.604) p2m = (127.10, 72.10749, 7.73, 1.604)
@@ -126,6 +110,8 @@ l2l_ratio = [i/j for i,j in zip(l2l, total)]
l2p_ratio = [i/j for i,j in zip(l2p, total)] l2p_ratio = [i/j for i,j in zip(l2p, total)]
p2p_ratio = [i/j for i,j in zip(p2p, total)] p2p_ratio = [i/j for i,j in zip(p2p, total)]
path = 'figures/kernels' path = 'figures/kernels'
x_pos = np.arange(len(systems)) x_pos = np.arange(len(systems))
ax.bar(x_pos, p2p_ratio, color='0', label='p2p') ax.bar(x_pos, p2p_ratio, color='0', label='p2p')