yzh119 commented on a change in pull request #10705:
URL: https://github.com/apache/tvm/pull/10705#discussion_r832742972
##########
File path: src/tir/schedule/analysis/analysis.cc
##########
@@ -145,23 +145,37 @@ ScopeBlockLoopInfo GetScopeBlockLoopInfo(const Block&
scope_block) {
/*!
* \brief Check the dominant property of a block:
- * the block is the only writer of its output, dominating the reader of its
output buffers
- * \param scope The block-scope of the block to be checked
- * \param block_sref The block whose dominant property is to be checked
- * \return A boolean indicating if the block is a dominant block
+ * the block is the only writer of its output, dominating the reader of its
output buffers under the
+ * given root scope.
+ * \param self The schedule state.
+ * \param scope_root_sref The StmtSRef corresponding to the root scope.
+ * \param block_sref The block whose dominant property is to be checked.
+ * \return A boolean indicating if the block is a dominant block.
*/
-bool IsDominantBlock(const BlockScope& scope, const StmtSRef& block_sref) {
+bool IsDominantBlock(const ScheduleState& self, const StmtSRef&
scope_root_sref,
+ const StmtSRef& block_sref) {
+ std::unordered_map<Buffer, Array<StmtSRef>, ObjectPtrHash, ObjectPtrEqual>
buffer_writers;
+ const BlockNode* maybe_root_block = scope_root_sref->StmtAs<BlockNode>();
+ if (maybe_root_block) {
Review comment:
Done.
--
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]