Skip to content

Commit fe9129c

Browse files
committed
Add assert to ensure the loop doesn't get stuck.
1 parent d04c203 commit fe9129c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

helion/autotuner/base_search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,7 @@ def _wait_for_all_step(
900900
) -> list[PrecompileFuture]:
901901
"""Start up to the concurrency cap, wait for progress, and return remaining futures."""
902902
cap = futures[0].search._jobs if futures else 1
903+
assert cap > 0, "autotune_precompile_jobs must be positive"
903904
running = [f for f in futures if f.started and f.ok is None and f.is_alive()]
904905

905906
# Start queued futures up to the cap

0 commit comments

Comments
 (0)