Skip to content

Commit 8a904c5

Browse files
author
Ubuntu
committed
Add log parsing for mcts_realtime
1 parent a5a8038 commit 8a904c5

File tree

1 file changed

+5
-18
lines changed
  • apps/autoscheduler/paper_results_scripts/final_results_for_paper/some_results_May_20/plot

1 file changed

+5
-18
lines changed

apps/autoscheduler/paper_results_scripts/final_results_for_paper/some_results_May_20/plot/extract_run

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22

33
from statistics import median
44
import glob
5-
import os
65

76
apps="bilateral_grid local_laplacian nl_means lens_blur camera_pipe stencil_chain harris hist max_filter unsharp interpolate conv_layer iir_blur bgu mat_mul resnet_50_blockwise".split(" ")
8-
autoschedulers="master random greedy beam mcts mcts_Cp_10 manual".split(" ")
7+
autoschedulers="master random greedy beam mcts mcts_Cp10 mcts_cost+real manual".split(" ")
98

109
def strip_non_digits(s):
1110
return "".join([c for c in s if c.isdigit() or c == "."])
@@ -160,13 +159,8 @@ with open('mincost.csv','w') as f:
160159
for autoscheduler in autoschedulers:
161160
if autoscheduler == 'random':
162161
values = get_rand_result(f"../{autoscheduler}/{app}.mincost.txt", scale, num_rand_runs[i], "JENNY_MINCOST: ")
163-
# if autoscheduler.startswith('mcts'):
164-
# tmp_log = f"../{autoscheduler}/{app}.tmp.log"
165-
# os.system(f"echo > {tmp_log}")
166-
# for log in glob.glob(f"../{autoscheduler}/{app}.log.*"):
167-
# os.system(f"cat {log} >> {tmp_log}")
168-
# values = get_mcts_result(f"tmp_log", scale, "JENNY_MINCOST: ")
169-
#values = get_mcts_result(f"../{autoscheduler}/{app}.log", scale, "JENNY_MINCOST: ")
162+
if autoscheduler == 'mcts_cost+real':
163+
values = get_mcts_result(f"../{autoscheduler}/{app}.log", scale, "JENNY_MINCOST: ")
170164
else:
171165
values = get_result(f"../{autoscheduler}/{app}.mincost.txt", scale, "JENNY_MINCOST: ")
172166

@@ -183,7 +177,6 @@ with open('mincost.csv','w') as f:
183177
f.write("{},{}\n".format(app, (',').join(results)))
184178
print("\n")
185179

186-
187180
with open('evaltime.csv','w') as f:
188181
print("evaltime")
189182
print(",".join(autoschedulers))
@@ -195,14 +188,8 @@ with open('evaltime.csv','w') as f:
195188
for autoscheduler in autoschedulers:
196189
if autoscheduler == 'random':
197190
values = get_rand_result(f"../{autoscheduler}/{app}.evaltime.txt", scale, num_rand_runs[i], "JENNY_EVALTIME: ")
198-
#if autoscheduler.startswith('mcts'):
199-
# tmp_log = f"../{autoscheduler}/{app}.tmp.log"
200-
# os.system(f"echo > {tmp_log}")
201-
# for log in glob.glob(f"../{autoscheduler}/{app}.log.*"):
202-
# os.system(f"cat {log} >> {tmp_log}")
203-
# tmp_log = f"../{autoscheduler}/{app}.tmp.log"
204-
# values = get_mcts_result(f"tmp_log", scale, "JENNY_EVALTIME: ")
205-
#values = get_mcts_result(f"../{autoscheduler}/{app}.log", scale, "JENNY_EVALTIME: ")
191+
if autoscheduler == 'mcts_cost+real':
192+
values = get_mcts_result(f"../{autoscheduler}/{app}.log", scale, "JENNY_EVALTIME: ")
206193
else:
207194
values = get_result(f"../{autoscheduler}/{app}.evaltime.txt", scale, "JENNY_EVALTIME: ")
208195

0 commit comments

Comments
 (0)