Skip to content

Commit

Permalink
updated evo search
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathryn-cat committed Jun 10, 2022
1 parent a1784f6 commit 1d3d55f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/meta_schedule/search_strategy/evolutionary_search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,7 @@ class EvolutionarySearch : public SearchStrategy {
EvolutionarySearchNode);
};

Array<Schedule> EvolutionarySearchSampleInitPopulation(ObjectRef _self, int num) {
const EvolutionarySearchNode* self = _self.as<EvolutionarySearchNode>();
Array<Schedule> EvolutionarySearchSampleInitPopulation(EvolutionarySearch self, int num) {
std::vector<Schedule> results = self->state_->SampleInitPopulation(num);
return Array<Schedule>(results.begin(), results.end());
}
Expand All @@ -733,6 +732,7 @@ Array<Schedule> EvolutionarySearchEvolveWithCostModel(ObjectRef _self, Array<Sch
IRModule mod = sch->mod();
size_t shash = StructuralHash()(mod);
if (!self->state_->measured_workloads_.Has(mod, shash)) {
self->state_->measured_workloads_.Add(mod, shash);
result.push_back(sch);
}
}
Expand Down

0 comments on commit 1d3d55f

Please sign in to comment.