@@ -62,17 +62,16 @@ def compile_kernels():
62
62
return
63
63
64
64
# Clear previous tune.log
65
- # command = [
66
- # 'rm',
67
- # os.path.join("tuned", "preprocessor", "tune.log"),
68
- # os.path.join("tuned", "qgemm_lut", "tune.log"),
69
- # ]
70
- # run_command(command, deploy_dir, ignore_errors=True)
65
+ preprocessor_dir = os .path .join (tuned_dir , "preprocessor" )
66
+ qgemm_lut_dir = os .path .join (tuned_dir , "qgemm_lut" )
67
+ print (f" Removing files in { preprocessor_dir } and { qgemm_lut_dir } ..." )
68
+ shutil .rmtree (preprocessor_dir , ignore_errors = True )
69
+ shutil .rmtree (qgemm_lut_dir , ignore_errors = True )
71
70
72
71
qargs = get_quant_args ()
73
72
command = [
74
73
'python' , 'compile.py' ,
75
- '-o' , f'{ os .path .join ("tuned" , model_name )} ' ,
74
+ '-o' , f'{ os .path .join (tuned_dir , model_name )} ' ,
76
75
'-da' ,
77
76
'-nt' , f'{ FLAGS .num_threads } ' ,
78
77
'-tb' ,
@@ -97,7 +96,7 @@ def compile_kernels():
97
96
98
97
# Move to pre-install directory
99
98
kernel_dir = os .path .join (tuned_dir , model_name )
100
- print (f" Copy built kernels from { kernel_dir } to { tuned_dir } " )
99
+ print (f" Copying built kernels from { kernel_dir } to { tuned_dir } ... " )
101
100
shutil .copytree (kernel_dir , tuned_dir , dirs_exist_ok = True )
102
101
103
102
0 commit comments