This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new a2ab47bbd9 Fix RuntimeError: parallel_for_dynamic (#18013)
a2ab47bbd9 is described below

commit a2ab47bbd910e0da21f5e501a4372338bbf58ea3
Author: Thais Camacho <[email protected]>
AuthorDate: Tue May 27 11:03:22 2025 -0300

    Fix RuntimeError: parallel_for_dynamic (#18013)
---
 src/meta_schedule/search_strategy/evolutionary_search.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/meta_schedule/search_strategy/evolutionary_search.cc 
b/src/meta_schedule/search_strategy/evolutionary_search.cc
index e43e15c999..4872f3aa5f 100644
--- a/src/meta_schedule/search_strategy/evolutionary_search.cc
+++ b/src/meta_schedule/search_strategy/evolutionary_search.cc
@@ -592,6 +592,7 @@ std::vector<Schedule> 
EvolutionarySearchNode::State::EvolveWithCostModel(
         // Loop until success
         for (int fail_count = 0; fail_count <= self->genetic_max_fail_count; 
++fail_count) {
           sampled_trace_id = trace_sampler();
+          sampled_trace_id = sampled_trace_id % self->population_size;
           tir::Trace trace = population.at(sampled_trace_id)->trace().value();
           if (Optional<Mutator> opt_mutator = mutator_sampler()) {
             // Decision: mutate

Reply via email to