Skip to content

Commit 7c141df

Browse files
authored
Merge pull request #3127 from luarss/topic/fix-sweep-dir
[Autotuner] fix sweep log-saving directory
2 parents a85382a + bc7e57a commit 7c141df

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

tools/AutoTuner/src/autotuner/distributed.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,7 @@ def sweep():
565565
temp = dict()
566566
for value in parameter:
567567
temp.update(value)
568-
queue.put(
569-
[args, repo_dir, temp, LOCAL_DIR, SDC_ORIGINAL, FR_ORIGINAL, INSTALL_PATH]
570-
)
568+
queue.put([args, repo_dir, temp, SDC_ORIGINAL, FR_ORIGINAL, INSTALL_PATH])
571569
workers = [consumer.remote(queue) for _ in range(args.jobs)]
572570
print("[INFO TUN-0009] Waiting for results.")
573571
ray.get(workers)

tools/AutoTuner/src/autotuner/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
import yaml
4141
import subprocess
4242
import sys
43+
import uuid
44+
import time
4345
from multiprocessing import cpu_count
4446
from datetime import datetime
45-
from uuid import uuid4 as uuid
46-
from time import time
4747

4848
import numpy as np
4949
import ray
@@ -624,15 +624,15 @@ def openroad_distributed(
624624
)
625625
if variant is None:
626626
variant = config.replace(" ", "_").replace("=", "_")
627-
t = time()
627+
t = time.time()
628628
metric_file = openroad(
629629
args=args,
630630
base_dir=repo_dir,
631631
parameters=config,
632-
flow_variant=f"{uuid()}-{variant}",
632+
flow_variant=f"{uuid.uuid4()}-{variant}" if variant else f"{uuid.uuid4()}",
633633
install_path=install_path,
634634
)
635-
duration = time() - t
635+
duration = time.time() - t
636636
return metric_file, duration
637637

638638

0 commit comments

Comments
 (0)