junrushao1994 commented on a change in pull request #8943:
URL: https://github.com/apache/tvm/pull/8943#discussion_r704129935
##########
File path: src/tir/schedule/analysis.h
##########
@@ -128,18 +138,36 @@ void CheckReductionBlock(const ScheduleState& self, const
StmtSRef& block_sref,
const StmtSRef& scope_root_sref);
/*!
- * \brief Check whether a subtree on SRef tree has compact data flow, and
throw an exception if the
- * subtree does not have compact data flow
- * \details For a given StmtSRef, We say the subtree rooted from the StmtSRef
has "compact data
- * flow" property if:
- * - the scope root of the input subtree root has stage-pipeline property, and
- * - all its child blocks on SRef tree are complete blocks or reduction blocks.
+ * \brief Check if the block is a complete block or a reduction block under
the scope
* \param self The schedule state
- * \param subtree_root_sref The root of the subtree to be checked in the SRef
tree
- * \throw ScheduleError If the subtree does not have compact data flow
- * \sa IsCompleteBlock, IsReductionBlock
+ * \param block_sref The sref of the block to be checked
+ * \param scope_root_sref The scope root of the block
+ * \throw ScheduleError If the block is neither a complete block nor a
reduction block
+ */
+void CheckCompleteOrReductionBlock(const ScheduleState& self, const StmtSRef&
block_sref,
+ const StmtSRef& scope_root_sref);
+
+/*!
+ * \brief Check if the block is an output block, i.e. the block writes to at
least a buffer that is
+ * not allocated under the current scope
+ * \param self The schedule state
+ * \param block_sref The block to be checked
+ * \param scope_root_sref The scope root of the block
+ * \return A boolean flag indicating if the block is an output block
+ */
+bool IsOutputBlock(const ScheduleState& self, const StmtSRef& block_sref,
+ const StmtSRef& scope_root_sref);
+
+/*!
+ * \brief Check if the block is not an output block, i.e. all the buffers the
block writes to
+ * are allocated under the current scope
Review comment:
I did updated the docks for both methods (`IsOutputBlock`,
`CheckNotOutputBlock`) in the previous PR. Note that the checking method
asserts if the predicate method's result is false (i.e. not output block), I
feel that the current doc is good
--
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]