Skip to content

Commit 357e9e0

Browse files
authored
[BENCHMARK] fix default timeout parameter (#17412)
Previously, the default value for `timeout` was bound at function definition time using `options.timeout`, which become outdated if `options.timeout` changes later. This commit changes the default value to `None` and assigns the current `options.timeout` inside the function, ensuring that the latest value is used when no explicit timeout is provided. Signed-off-by: Łukasz Plewa <lukasz.plewa@intel.com>
1 parent d190f01 commit 357e9e0

File tree

1 file changed

+4
-1
lines changed
  • unified-runtime/scripts/benchmarks/utils

1 file changed

+4
-1
lines changed

unified-runtime/scripts/benchmarks/utils/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ def run(
2020
cwd=None,
2121
add_sycl=False,
2222
ld_library=[],
23-
timeout=options.timeout,
23+
timeout=None,
2424
):
2525
try:
26+
if timeout is None:
27+
timeout = options.timeout
28+
2629
if isinstance(command, str):
2730
command = command.split()
2831

0 commit comments

Comments
 (0)