jcf94 commented on a change in pull request #6269:
URL: https://github.com/apache/incubator-tvm/pull/6269#discussion_r473562234
##########
File path: src/auto_scheduler/search_policy/sketch_policy_rules.cc
##########
@@ -580,5 +760,155 @@ InitPopulationRule::ResultKind
InitVectorization::Apply(SketchPolicyNode* policy
return ResultKind::kValid;
}
+InitPopulationRule::ResultKind InitThreadBind::Apply(SketchPolicyNode* policy,
State* state) const {
+ std::set<int> multi_level_tiling_root_set;
+ for (size_t stage_id = 0; stage_id < (*state)->stages.size(); ++stage_id) {
+ if (NeedsMultilevelTiling(policy->search_task, *state, stage_id)) {
+ const Stage& stage = (*state)->stages[stage_id];
+ if (stage->compute_at != ComputeAtKind::kIter) {
+ // This stage is not multi-level tiled,
+ // so it must be produced by RuleCrossThreadReduction.
+ CHECK(HasCrossThreadReduction(*state, stage_id));
+ } else {
+ const auto res =
(*state)->attach_map->stage_to_attach_iter.find(stage_id);
+ CHECK(res != (*state)->attach_map->stage_to_attach_iter.end());
+ multi_level_tiling_root_set.insert(res->second.first);
+ }
+ }
+ }
Review comment:
Update the https://github.com/merrymercy/Ansor/pull/95 here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]