yzh119 commented on a change in pull request #10420:
URL: https://github.com/apache/tvm/pull/10420#discussion_r817290623
##########
File path: src/tir/schedule/analysis/analysis.cc
##########
@@ -363,6 +363,26 @@ void CheckCompleteOrReductionBlock(const ScheduleState&
self, const StmtSRef& bl
reduction_block_error_code);
}
+StmtSRef GetInnermostDominantSubBlockSRef(const ScheduleState& self, const
StmtSRef& block_sref) {
+ // return the innermost dominant sub-block.
+ const BlockNode* block = TVM_SREF_TO_BLOCK(block, block_sref);
+ bool all_iter_vars_data_parallel = true;
+ for (const IterVar& iter_var : block->iter_vars) {
+ if (iter_var->iter_type != kDataPar) {
+ all_iter_vars_data_parallel = false;
+ }
+ }
+ Array<StmtSRef> child_block_srefs = GetChildBlockSRefOnSRefTree(self,
block_sref);
+ if (!block->init.defined() && child_block_srefs.size() == 1 &&
all_iter_vars_data_parallel) {
+ const StmtSRef& child_block_sref = child_block_srefs[0];
+ if (IsDominantBlock(self->GetBlockScope(block_sref), child_block_sref)) {
Review comment:
Yes, I checked the implementation of `IsDominantBlock` I found this case
was not considered. But I wonder if it's desired behavior?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]