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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to