Skip to content

Commit

Permalink
Fix compile_unet commands
Browse files Browse the repository at this point in the history
  • Loading branch information
RattataKing committed Aug 21, 2024
1 parent 58a745b commit 145f768
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions tuning/libtuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ def compile_models(
args,
candidate_id=i,
command=tuning_client.get_model_compile_command(candidate_trackers[i]),
check=False
)
for i in candidates
if i != 0
Expand Down
12 changes: 3 additions & 9 deletions tuning/punet_autotune.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ def get_model_compile_command(
) -> list[str]:
mlir_spec_path = candidate_tracker.spec_path
assert mlir_spec_path is not None
script_dir = Path(__file__).resolve().parent
command = [
"./compile_unet_candidate.sh",
"winograd",
mlir_spec_path.as_posix(),
]
target_dir = mlir_spec_path.resolve().parent.parent.parent
output_name = f"unet_candidate_{candidate_tracker.candidate_id}.vmfb"
command = [
"timeout",
"300s",
Expand All @@ -81,9 +77,7 @@ def get_model_compile_command(
f"{mlir_spec_path.resolve()}",
"./punet.mlir",
"-o",
(
script_dir / "unet_candidate_{candidate_tracker.candidate_id}.vmfb"
).as_posix(),
(target_dir / output_name).as_posix()
]
return command

Expand Down

0 comments on commit 145f768

Please sign in to comment.