Skip to content

Commit

Permalink
offload: Plots for LBR paper
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Dec 11, 2023
1 parent baf596b commit 715bbb9
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions target/sim/sw/host/apps/experimental_offload/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ def baseline_runtime(apps, sizes):
def runtime_comparison(apps, sizes):
x = N_CLUSTERS

plt.rcParams['font.size'] = '5'
fig, ax = plt.subplots(1, len(apps), layout="constrained")
fig.set_figwidth(3.8)
fig.set_figwidth(1.83)
fig.set_figheight(1.53)

if not hasattr(ax, '__len__'):
ax = [ax]
Expand All @@ -273,7 +275,7 @@ def runtime_comparison(apps, sizes):

ax[i].set_xticks(x)
ax[i].set_xlim([0, 33])
ax[i].set_title(APP_LABELS[app])
# ax[i].set_title(APP_LABELS[app])
ax[i].legend()
ax[i].grid(color='gainsboro', which='both', linewidth=0.5)

Expand Down Expand Up @@ -357,8 +359,10 @@ def strong_scaling(app):

def mcast_speedup(apps, sizes_per_cluster):

plt.rcParams['font.size'] = '5'
fig, ax = plt.subplots(len(apps), 1, layout="constrained")
fig.set_figwidth(3.8)
fig.set_figwidth(1.83)
fig.set_figheight(1.53)

if not hasattr(ax, '__len__'):
ax = [ax]
Expand All @@ -382,7 +386,10 @@ def mcast_speedup(apps, sizes_per_cluster):
print(list(set(all_x)))

if j == (len(apps) - 1):
ax[j].set_xticks(list(set(all_x)), [str(x) for x in list(set(all_x))], rotation=-45)
real_all_x = [128,256, 512, 1024, 2048]
almost_all_x_str = ['128', '', '512', '1024', '2048']
# ax[j].set_xticks(list(set(all_x)), [str(x) for x in list(set(all_x))], rotation=-45)
ax[j].set_xticks(real_all_x, almost_all_x_str, rotation=-45)
else:
ax[j].set_xticks(list(set(all_x)))
ax[j].tick_params(
Expand All @@ -393,7 +400,7 @@ def mcast_speedup(apps, sizes_per_cluster):

ax[j].set_ylim([1, ax[j].get_ylim()[1]])
ax[j].legend()
ax[j].set_title(APP_LABELS[app])
# ax[j].set_title(APP_LABELS[app])
ax[j].grid(color='gainsboro', linewidth=0.5)

fig.supxlabel('Problem size')
Expand Down

0 comments on commit 715bbb9

Please sign in to comment.