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 06:45:15 UTC

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

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



##########
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:
       How about Clone?




-- 
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