Skip to content

Commit

Permalink
script: Remove tmp files
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcxzyw committed Jul 16, 2024
1 parent abfb1fa commit 4bc20bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/gen_optimized.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def run_opt(task):
diff_ret = subprocess.run(['diff', '-q', tmp_output, output_file], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if diff_ret.returncode != 0:
os.replace(tmp_output, output_file)
else:
os.remove(tmp_output)
else:
cmd = ['perf', 'stat', '-e', 'instructions:u'] + cmd + ['-disable-output']
ret = subprocess.run(cmd,stdin=subprocess.DEVNULL, timeout=600.0, capture_output=True)
Expand Down

0 comments on commit 4bc20bb

Please sign in to comment.