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/06/09 19:44:05 UTC

[GitHub] [tvm] masahi commented on a diff in pull request #11513: [BYOC][DNNL] Improve performance of DNNL BYOC dense operator

masahi commented on code in PR #11513:
URL: https://github.com/apache/tvm/pull/11513#discussion_r893892899


##########
src/relay/backend/contrib/dnnl/codegen.cc:
##########
@@ -436,6 +436,38 @@ class DNNLModuleCodegen : public CSourceModuleCodegenBase {
 
 #else  // DNNL JSON runtime
 
+/*!
+ * \brief Retrieve the expected "root" op nested inside a fused call, such as conv2d in
+ *        relu(add(conv2d))
+ * \param call A Relay call node. Typically nn.relu when called the first time.
+ * \param max_depth The maximum number of calls before the root op, counting from current_call.
+ * \param root_name The name of expected "root" op in this fused call.
+ * \return A CallNode corresponding to the root op
+ */
+inline const CallNode* FindCallWithName(const CallNode* current_call, int max_depth,
+                                        const std::string& root_name) {

Review Comment:
   This looks similar to https://github.com/apache/tvm/blob/521b80af217a60bf4be3febd5a1e081eb4f76b93/src/relay/backend/utils.h#L473
   
   Can we use that instead?



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