Skip to content

Commit bdb70f8

Browse files
committed
[Fix] Fix the script to clear tune.log.
1 parent bca3ea4 commit bdb70f8

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

tools/run_pipeline.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,16 @@ def compile_kernels():
6262
return
6363

6464
# 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)
7170

7271
qargs = get_quant_args()
7372
command = [
7473
'python', 'compile.py',
75-
'-o', f'{os.path.join("tuned", model_name)}',
74+
'-o', f'{os.path.join(tuned_dir, model_name)}',
7675
'-da',
7776
'-nt', f'{FLAGS.num_threads}',
7877
'-tb',
@@ -97,7 +96,7 @@ def compile_kernels():
9796

9897
# Move to pre-install directory
9998
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}...")
101100
shutil.copytree(kernel_dir, tuned_dir, dirs_exist_ok=True)
102101

103102

0 commit comments

Comments
 (0)