Skip to content

Commit

Permalink
TVMC: Don't divide trials by zero tasks (#10164)
Browse files Browse the repository at this point in the history
If there are no tasks to tune, the number of trails is meaningless.

Co-authored-by: Martin Kröning <martin.kroening@neclab.eu>
  • Loading branch information
mkroening and Martin Kröning committed Feb 6, 2022
1 parent 63377f2 commit 774df1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/driver/tvmc/autotuner.py
Expand Up @@ -468,7 +468,7 @@ def tune_model(

# In autotvm, trials is specified per task. We can convert the per-model input
# provided to per-task trials by dividing by the number of tasks.
trials = int(trials / len(tasks))
trials = int(trials / max(len(tasks), 1))
logger.info("Autotuning with %d trials per task.", trials)

tuning_options = {
Expand Down

0 comments on commit 774df1d

Please sign in to comment.