You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/04/01 12:38:10 UTC

[GitHub] [tvm] tqchen commented on a change in pull request #10843: [TIR] StmtFunctor ReGenerateDef

tqchen commented on a change in pull request #10843:
URL: https://github.com/apache/tvm/pull/10843#discussion_r840544484



##########
File path: include/tvm/tir/stmt_functor.h
##########
@@ -413,6 +413,16 @@ inline T Substitute(T input, const std::unordered_map<const VarNode*, PrimExpr>&
  */
 TVM_DLL void PreOrderVisit(const ObjectRef& stmt_or_expr,
                            const std::function<bool(const ObjectRef&)>& fvisit);
+
+class PrimFunc;
+/*!
+ * \brief Re-generate the definition nodes for a TIR, including VarDef, BufferDef.
+ *        This pass works as a simple DeepCopy to duplicate a function with different Vars and
+ *        Buffers but the same behavior
+ * \param func The input PrimFunc.
+ * \return The new generated func.
+ */
+TVM_DLL PrimFunc ReGenerateDef(const PrimFunc& func);

Review comment:
       Renew seems to be right. However the purpose here is to regenerate all defs, so RenewDefs and add comment that we are going to renew all defs including buffer/var(or future var like defs) sounds about right




-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org