diff --git a/src/meta_schedule/search_strategy/evolutionary_search.cc b/src/meta_schedule/search_strategy/evolutionary_search.cc index cffe1187caeb2..caf39708891c6 100644 --- a/src/meta_schedule/search_strategy/evolutionary_search.cc +++ b/src/meta_schedule/search_strategy/evolutionary_search.cc @@ -716,8 +716,7 @@ class EvolutionarySearch : public SearchStrategy { EvolutionarySearchNode); }; -Array EvolutionarySearchSampleInitPopulation(ObjectRef _self, int num) { - const EvolutionarySearchNode* self = _self.as(); +Array EvolutionarySearchSampleInitPopulation(EvolutionarySearch self, int num) { std::vector results = self->state_->SampleInitPopulation(num); return Array(results.begin(), results.end()); } @@ -733,6 +732,7 @@ Array EvolutionarySearchEvolveWithCostModel(ObjectRef _self, Arraymod(); size_t shash = StructuralHash()(mod); if (!self->state_->measured_workloads_.Has(mod, shash)) { + self->state_->measured_workloads_.Add(mod, shash); result.push_back(sch); } }