Skip to content

Commit dc00363

Browse files
committed
Store var val
1 parent 3557de3 commit dc00363

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

sharktuner/sharktuner/libtuner.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,15 +1303,13 @@ def benchmark(
13031303
)
13041304

13051305
for res in candidate_results:
1306-
tuning_client.tuning_records[
1307-
res.candidate_id
1308-
].benchmark_device_id = res.device_id
1309-
if res.time == math.inf:
1306+
c_id = res.candidate_id
1307+
res_time = res.time
1308+
tuning_client.tuning_records[c_id].benchmark_device_id = res.device_id
1309+
if res_time == math.inf:
13101310
continue
1311-
tuning_client.tuning_records[res.candidate_id].benchmark_status = True
1312-
tuning_client.tuning_records[res.candidate_id].benchmark_time_us = round(
1313-
res.time, 2
1314-
)
1311+
tuning_client.tuning_records[c_id].benchmark_status = True
1312+
tuning_client.tuning_records[c_id].benchmark_time_us = round(res_time, 2)
13151313

13161314
second_baseline_result, _ = benchmark_baseline(
13171315
devices=args.devices,

0 commit comments

Comments
 (0)