comaniac commented on a change in pull request #6724:
URL: https://github.com/apache/incubator-tvm/pull/6724#discussion_r511012768



##########
File path: include/tvm/relay/op_attr_types.h
##########
@@ -185,6 +185,20 @@ using FTVMLegalize = runtime::TypedPackedFunc<Expr(const 
Attrs& attrs, const Arr
 using FTVMAnnotateTarget = runtime::TypedPackedFunc<bool(const Attrs& attrs,  
// NOLINT(*)
                                                          const Array<Expr>& 
args)>;
 
+/*!
+ * \brief Annotates an expression to indicate if an op should be compiled using
+ *  the given compiler/target.
+ *  \param attrs The attribute of the original expr.
+ *  \param args The arguments of the original expr.
+ *  \param out_type The return type of the original expr.
+ *
+ *  \return true if this op should be registered to invoke a specific compiler
+ *  for codegen, otherwise, false.
+ */
+using FTVMAnnotateTarget3 =

Review comment:
       I can totally understand your point about minimizing the changes, but I 
personally don't think it's a big issue given that we only have a few existing 
codegen. Since BYOC is getting mature, we should avoid ad hoc implementation as 
we can. In fact, we are planning to do another refactoring to cleanup redundant 
code.
   
   The changing (or addition) of annotate target, which is one of the most 
important interfaces to codegen developers, are better to start with an RFC. It 
is fine even the RFC is small and simple. The main purposes are 1) making sure 
this change is compatible to all cases, and 2) letting everyone know you are 
going to make this change.




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

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


Reply via email to