Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RattataKing committed Aug 21, 2024
1 parent c516eb9 commit 01f36ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tuning/libtuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ def run_command_wrapper(task_tuple: TaskPack) -> TaskResult:

task_result = TaskResult(
res, task_tuple.candidate_id, device_id=str(-1)
) # main process
) # Main process
if device_id:
task_result = TaskResult(res, task_tuple.candidate_id, device_id) # sub process
task_result = TaskResult(res, task_tuple.candidate_id, device_id) # Subprocess

time.sleep(task_tuple.cooling_time)

Expand Down Expand Up @@ -1095,7 +1095,7 @@ def parse_model_benchmark_results(
candidate_results = sorted(candidate_results, key=lambda br: br.device_id)
baseline_results = sorted(baseline_results, key=lambda tr: tr.device_id)

# Assign candidates to same groups by device_id
# Assign candidates to the same groups by device_id
grouped_candidate_results = group_benchmark_results_by_device_id(candidate_results)

# Insert baseline results to the head of each list
Expand Down
3 changes: 2 additions & 1 deletion tuning/punet_autotune.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ 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
target_dir = mlir_spec_path.resolve().parent.parent.parent
output_name = f"unet_candidate_{candidate_tracker.candidate_id}.vmfb"
command = [
"timeout",
"300s",
"../int8-model/compile-punet-base.sh",
(script_dir / "../int8-model/...").as_posix(),
"./tools/iree-compile",
"gfx942",
f"{mlir_spec_path.resolve()}",
Expand Down

0 comments on commit 01f36ee

Please sign in to comment.