|
|
@ -7,6 +7,8 @@ import matplotlib.pyplot as plt |
|
|
|
|
|
|
|
from common import calc_throughput |
|
|
|
|
|
|
|
folder_path = "benchmark-results/" |
|
|
|
|
|
|
|
runid = "Run ID" |
|
|
|
x_label = "Destination Node" |
|
|
|
y_label = "Source Node" |
|
|
@ -18,6 +20,8 @@ title_allnodes = \ |
|
|
|
title_smartnodes = \ |
|
|
|
"""Copy Throughput in GiB/s tested for 1GiB Elements\n |
|
|
|
Using Cross-Copy for Intersocket and all 4 Chiplets of Socket for Intrasocket""" |
|
|
|
title_difference = \ |
|
|
|
"""Gain in Copy Throughput in GiB/s of All-DSA vs. Smart Assignment""" |
|
|
|
|
|
|
|
description_smartnodes = \ |
|
|
|
"""Copy Throughput in GiB/s tested for 1GiB Elements\n |
|
|
@ -68,15 +72,23 @@ def process_file_to_dataset(file_path, src_node, dst_node): |
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
def plot_heatmap(table,title,node_config): |
|
|
|
plt.figure(figsize=(8, 6)) |
|
|
|
|
|
|
|
sns.heatmap(table, annot=True, cmap="YlGn", fmt=".0f") |
|
|
|
|
|
|
|
plt.title(title) |
|
|
|
plt.savefig(os.path.join(folder_path, f"plot-perf-{node_config}-throughput.png"), bbox_inches='tight') |
|
|
|
plt.show() |
|
|
|
|
|
|
|
|
|
|
|
# loops over all possible configuration combinations and calls |
|
|
|
# process_file_to_dataset for them in order to build a dataframe |
|
|
|
# which is then displayed and saved |
|
|
|
def main(node_config,title): |
|
|
|
folder_path = "benchmark-results/" |
|
|
|
|
|
|
|
for src_node in range(16): |
|
|
|
for dst_node in range(16): |
|
|
|
size = "512mib" if src_node == dst_node and src_node >= 8 else "1gib" |
|
|
|
size = "512mib" if node_config == "allnodes" and src_node == dst_node and src_node >= 8 else "1gib" |
|
|
|
file = os.path.join(folder_path, f"copy-n{src_node}ton{dst_node}-{size}-{node_config}-1e.json") |
|
|
|
process_file_to_dataset(file, src_node, dst_node) |
|
|
|
|
|
|
@ -85,15 +97,14 @@ def main(node_config,title): |
|
|
|
data.clear() |
|
|
|
df.set_index(index, inplace=True) |
|
|
|
data_pivot = df.pivot_table(index=y_label, columns=x_label, values=v_label) |
|
|
|
plt.figure(figsize=(8, 6)) |
|
|
|
|
|
|
|
sns.heatmap(data_pivot, annot=True, cmap="rocket_r", fmt=".0f") |
|
|
|
plot_heatmap(data_pivot, title, node_config) |
|
|
|
|
|
|
|
plt.title(title) |
|
|
|
plt.savefig(os.path.join(folder_path, f"plot-perf-{node_config}-throughput.png"), bbox_inches='tight') |
|
|
|
plt.show() |
|
|
|
return data_pivot |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
main("allnodes", title_allnodes) |
|
|
|
main("smart", title_smartnodes) |
|
|
|
dall = main("allnodes", title_allnodes) |
|
|
|
dsmart = main("smart", title_smartnodes) |
|
|
|
ddiff = dall - dsmart |
|
|
|
plot_heatmap(ddiff,title_difference,"diff") |