Skip to content
Snippets Groups Projects
Commit 831efeff authored by Yifan Zhao's avatar Yifan Zhao
Browse files

Fixed a bug in profile plotting and added test case for it

parent 3dfefcee
No related branches found
No related tags found
No related merge requests found
...@@ -125,8 +125,8 @@ def plot_hpvm_configs( ...@@ -125,8 +125,8 @@ def plot_hpvm_configs(
qoses, speedups = qos_speedup.T qoses, speedups = qos_speedup.T
fig, ax = plt.subplots(**fig_kwargs) fig, ax = plt.subplots(**fig_kwargs)
ax.scatter(qoses, speedups) ax.scatter(qoses, speedups)
ax.xlabel("QoS Loss") ax.set_xlabel("QoS Loss")
ax.ylabel("Speedup (X)") ax.set_ylabel("Speedup (X)")
if save_to: if save_to:
fig.savefig(save_to, dpi=300) fig.savefig(save_to, dpi=300)
return fig return fig
......
...@@ -4,7 +4,7 @@ import site ...@@ -4,7 +4,7 @@ import site
from pathlib import Path from pathlib import Path
from sys import argv from sys import argv
from hpvm_profiler import profile_configs, read_hpvm_configs, write_hpvm_configs from hpvm_profiler import profile_configs, read_hpvm_configs, write_hpvm_configs, plot_hpvm_configs
self_folder = Path(__file__).parent.absolute() self_folder = Path(__file__).parent.absolute()
site.addsitedir(self_folder.parent) site.addsitedir(self_folder.parent)
...@@ -20,3 +20,4 @@ out_config_file = f"./{netname}.txt" ...@@ -20,3 +20,4 @@ out_config_file = f"./{netname}.txt"
header, configs = read_hpvm_configs(config_file) header, configs = read_hpvm_configs(config_file)
profile_configs(binary_file, configs[1:6], configs[0], progress_bar=False) profile_configs(binary_file, configs[1:6], configs[0], progress_bar=False)
write_hpvm_configs(header, configs[:6], out_config_file) write_hpvm_configs(header, configs[:6], out_config_file)
plot_hpvm_configs(out_config_file, f"{netname}.png")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment