Skip to content

Commit 76ee393

Browse files
committed
updated evo search
1 parent 3721052 commit 76ee393

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/meta_schedule/search_strategy/evolutionary_search.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,8 +716,7 @@ class EvolutionarySearch : public SearchStrategy {
716716
EvolutionarySearchNode);
717717
};
718718

719-
Array<Schedule> EvolutionarySearchSampleInitPopulation(ObjectRef _self, int num) {
720-
const EvolutionarySearchNode* self = _self.as<EvolutionarySearchNode>();
719+
Array<Schedule> EvolutionarySearchSampleInitPopulation(EvolutionarySearch self, int num) {
721720
std::vector<Schedule> results = self->state_->SampleInitPopulation(num);
722721
return Array<Schedule>(results.begin(), results.end());
723722
}
@@ -733,6 +732,7 @@ Array<Schedule> EvolutionarySearchEvolveWithCostModel(ObjectRef _self, Array<Sch
733732
IRModule mod = sch->mod();
734733
size_t shash = StructuralHash()(mod);
735734
if (!self->state_->measured_workloads_.Has(mod, shash)) {
735+
self->state_->measured_workloads_.Add(mod, shash);
736736
result.push_back(sch);
737737
}
738738
}

0 commit comments

Comments
 (0)