2
2
3
3
from statistics import median
4
4
import glob
5
- import os
6
5
7
6
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 (" " )
9
8
10
9
def strip_non_digits (s ):
11
10
return "" .join ([c for c in s if c .isdigit () or c == "." ])
@@ -160,13 +159,8 @@ with open('mincost.csv','w') as f:
160
159
for autoscheduler in autoschedulers :
161
160
if autoscheduler == 'random' :
162
161
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: " )
170
164
else :
171
165
values = get_result (f"../{ autoscheduler } /{ app } .mincost.txt" , scale , "JENNY_MINCOST: " )
172
166
@@ -183,7 +177,6 @@ with open('mincost.csv','w') as f:
183
177
f .write ("{},{}\n " .format (app , (',' ).join (results )))
184
178
print ("\n " )
185
179
186
-
187
180
with open ('evaltime.csv' ,'w' ) as f :
188
181
print ("evaltime" )
189
182
print ("," .join (autoschedulers ))
@@ -195,14 +188,8 @@ with open('evaltime.csv','w') as f:
195
188
for autoscheduler in autoschedulers :
196
189
if autoscheduler == 'random' :
197
190
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: " )
206
193
else :
207
194
values = get_result (f"../{ autoscheduler } /{ app } .evaltime.txt" , scale , "JENNY_EVALTIME: " )
208
195
0 commit comments