tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] anijain2305 commented on a change in pull request #5422: [RELAY][Convert Layout] Specify additional layouts in convert layout pass
Date Thu, 23 Apr 2020 18:04:23 GMT

anijain2305 commented on a change in pull request #5422:
URL: https://github.com/apache/incubator-tvm/pull/5422#discussion_r414011046



##########
File path: include/tvm/relay/op_attr_types.h
##########
@@ -158,13 +158,15 @@ using FTVMAlterOpLayout = runtime::TypedPackedFunc<
  * \param tinfos An array of placeholders, use for getting the inferred shape
  *               and dtype of the inputs.
  * \param desired_layout The desired layout.
+ * \param additional_layouts Specify additional layouts, e.g. kernel_layout.
  * \return new_expr The modified expression.
  */
 using FTVMConvertOpLayout = runtime::TypedPackedFunc<
   Expr(const Attrs& attrs,
        const Array<Expr>& args,
        const Array<te::Tensor>& tinfos,
-       const std::string& desired_layout)>;
+       const std::string& desired_layout,

Review comment:
       You are correct in understanding my proposal.
   
   Thats interesting. Although, we don't any operator with three different layouts. For this,
maybe, we can use a string "default" (or maybe a better name), that leaves the layout for
the tensor in that index unchanged. 
   
   Therefore, we can be stricter while calling the ConvertLayout pass. The user must define
the layouts for all the tensors. If he/she does not care about a certain tensor layout, even
then they must say "default".




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message