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/01/20 06:50:49 UTC

[GitHub] [tvm] crazydemo opened a new pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

crazydemo opened a new pull request #9995:
URL: https://github.com/apache/tvm/pull/9995


   Enabled OP List:
   
   - Convolution 1D-3D
   - Deconvolution 2D-3D
   - Pooling 2D-3D (avg / max)
   - Elementwise OPs (abs, clip, exp, log, sqrt, round, logsumexp, relu, leaky_relu, tanh, sigmoid, softmax)


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041057518


   > I can merge this after you pass CI.
   Thank you! I will check!
   


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



[GitHub] [tvm] mbs-octoml commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
mbs-octoml commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1031728404


   @mikepapadim can you take a look at a this one, thanks.


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041163172


   The PR, updating CI has been submitted [#10266](https://github.com/apache/tvm/pull/10266) @masahi 


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1043740446


   Got it! Thank you for all your help and explanation!


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



[GitHub] [tvm] tmoreau89 commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
tmoreau89 commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1017769375


   CC @apeskov and @mbs-octoml 


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1038545873


   > > @mikepapadim can you take a look at a this one, thanks.
   > 
   > I ll take a look!
   
   Hi @mikepapadim, do you have any comments?


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



[GitHub] [tvm] masahi commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1043738644


   So this is how it works. 
   
   * The new CI image was created 3 hours ago in https://hub.docker.com/r/tlcpackstaging/ci_cpu/tags that contains the new dnnl change. I need to test this image in the staging branch, which I just started at https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/ci-docker-staging/217/pipeline. 
   * After that CI job passes, I'll open a PR to update `Jenkinsfile` to point to the new cpu image.
   * After that PR is merged, you can resume your work in this PR.
   
   CI update is an involved process. So please wait until at least tomorrow. 


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



[GitHub] [tvm] vpirogov commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
vpirogov commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041170017


   @crazydemo, right, we stopped publishing binary releases on Github after v2.2. Binaries for later versions are available on [conda-forge](https://anaconda.org/conda-forge/onednn/files).


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041131131


   Hi @masahi , I wonder which version of OneDNN is used for CI.
   I have one build error, which says `'eltwise_logsigmoid' is not a member of 'dnnl::algorithm'`, and this algo is supported by OneDNNv1.8 or the later version.
   Could you help me skip this check?


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041156478


   > The latest oneDNN release is [v2.5.2](https://github.com/oneapi-src/oneDNN/releases/tag/v2.5.2)
   
   Yes, the latest release version is v2.5.2, but only v2.2 has [dnnl_lnx_2.2.0_cpu_gomp.tgz](https://github.com/oneapi-src/oneDNN/releases/download/v2.2/dnnl_lnx_2.2.0_cpu_gomp.tgz)


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



[GitHub] [tvm] masahi commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1046539238


   @crazydemo please look at the CI issues.


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1031014558


   Hi, @apeskov and @mbs-octoml. Could you please take some time to review this PR? Look forward to your comments.


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041151095


   > Note that changing the docker script won't immediately update the CI environment (so the build will fail again).You need to send that change separately first like #10179. I can take care of actually updating the ci image.
   
   Do I need to submit an RFC, or just submit an independent PR?


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



[GitHub] [tvm] masahi commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1045336114


   @crazydemo it's ready now.


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



[GitHub] [tvm] crazydemo commented on a change in pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on a change in pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#discussion_r810775996



##########
File path: python/tvm/relay/op/contrib/dnnl.py
##########
@@ -67,22 +67,39 @@ def _func_wrapper(expr):
 
 
 _register_external_op_helper("nn.batch_norm")
+_register_external_op_helper("nn.conv1d")
 _register_external_op_helper("nn.conv2d")
+_register_external_op_helper("nn.conv3d")
+_register_external_op_helper("nn.conv2d_transpose")
+_register_external_op_helper("nn.conv3d_transpose")
 _register_external_op_helper("nn.dense")
+_register_external_op_helper("nn.max_pool2d")
+_register_external_op_helper("nn.avg_pool2d")
+_register_external_op_helper("nn.max_pool3d")
+_register_external_op_helper("nn.avg_pool3d")
+_register_external_op_helper("abs")
+_register_external_op_helper("clip")
+_register_external_op_helper("exp")
+_register_external_op_helper("log")
+_register_external_op_helper("sqrt")
+_register_external_op_helper("round")
+_register_external_op_helper("logsumexp")
 _register_external_op_helper("nn.relu")
+_register_external_op_helper("nn.leaky_relu")
 _register_external_op_helper("tanh")
 _register_external_op_helper("sigmoid")
+_register_external_op_helper("nn.softmax")
 _register_external_op_helper("add")
 _register_external_op_helper("multiply")
 
 
-def make_conv_pattern(with_bias=True, with_eltwise=None):
-    """Create patterns related to nn.conv2d.
+def make_conv_pattern(conv_name, with_bias=True, with_eltwise=None):
+    """Create patterns related to conv and deconv.
 
     Parameters
     ----------
     with_bias : bool
-        Whether attach `bias_add` to `nn.conv2d`.
+        Whether attach `bias_add` to `conv / deconv`.

Review comment:
       Thank you for your help. I will change it into `conv2d_transpose` in the next PR.




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



[GitHub] [tvm] mikepapadim commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
mikepapadim commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1031731462


   > @mikepapadim can you take a look at a this one, thanks.
   
   I ll take a look! 


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



[GitHub] [tvm] masahi commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041051727


   I can merge this after you pass CI.


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



[GitHub] [tvm] masahi commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041151961


   No need for another rfc.


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041172051


   @vpirogov Thank you so much! I will update the CI to the latest version.


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



[GitHub] [tvm] masahi commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041149531


   Note that changing the docker script won't immediately update the CI environment.You need to send that change separately first like https://github.com/apache/tvm/pull/10179. I can take care of actually update the ci image.


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



[GitHub] [tvm] vpirogov commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
vpirogov commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041154312


   The latest oneDNN release is [v2.5.2](https://github.com/oneapi-src/oneDNN/releases/tag/v2.5.2)


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



[GitHub] [tvm] masahi commented on a change in pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#discussion_r810774567



##########
File path: python/tvm/relay/op/contrib/dnnl.py
##########
@@ -67,22 +67,39 @@ def _func_wrapper(expr):
 
 
 _register_external_op_helper("nn.batch_norm")
+_register_external_op_helper("nn.conv1d")
 _register_external_op_helper("nn.conv2d")
+_register_external_op_helper("nn.conv3d")
+_register_external_op_helper("nn.conv2d_transpose")
+_register_external_op_helper("nn.conv3d_transpose")
 _register_external_op_helper("nn.dense")
+_register_external_op_helper("nn.max_pool2d")
+_register_external_op_helper("nn.avg_pool2d")
+_register_external_op_helper("nn.max_pool3d")
+_register_external_op_helper("nn.avg_pool3d")
+_register_external_op_helper("abs")
+_register_external_op_helper("clip")
+_register_external_op_helper("exp")
+_register_external_op_helper("log")
+_register_external_op_helper("sqrt")
+_register_external_op_helper("round")
+_register_external_op_helper("logsumexp")
 _register_external_op_helper("nn.relu")
+_register_external_op_helper("nn.leaky_relu")
 _register_external_op_helper("tanh")
 _register_external_op_helper("sigmoid")
+_register_external_op_helper("nn.softmax")
 _register_external_op_helper("add")
 _register_external_op_helper("multiply")
 
 
-def make_conv_pattern(with_bias=True, with_eltwise=None):
-    """Create patterns related to nn.conv2d.
+def make_conv_pattern(conv_name, with_bias=True, with_eltwise=None):
+    """Create patterns related to conv and deconv.
 
     Parameters
     ----------
     with_bias : bool
-        Whether attach `bias_add` to `nn.conv2d`.
+        Whether attach `bias_add` to `conv / deconv`.

Review comment:
       We don't use `deconv` terminology. Since this is a pattern for Relay graph, please use `conv2d_transpose`.




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



[GitHub] [tvm] masahi edited a comment on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi edited a comment on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041149531


   Note that changing the docker script won't immediately update the CI environment (so the build will fail again).You need to send that change separately first like https://github.com/apache/tvm/pull/10179. I can take care of actually updating the ci image.


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041046078


   @tmoreau89 @mbs-octoml @mikepapadim @masahi Could you please help me review this PR? 


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



[GitHub] [tvm] masahi commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041135514


   https://github.com/apache/tvm/blob/813136401a11a49d6c15e6013c34dd822a5c4ff6/docker/install/ubuntu_install_dnnl.sh#L24
   
   Probably too old, we should update that first.


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1038545873


   > > @mikepapadim can you take a look at a this one, thanks.
   > 
   > I ll take a look!
   
   Hi @mikepapadim, do you have any comments?


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1041139323


   I will try to update to `OneDNN V2.2`.


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



[GitHub] [tvm] crazydemo commented on pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
crazydemo commented on pull request #9995:
URL: https://github.com/apache/tvm/pull/9995#issuecomment-1043715171


   hi @masahi , how can I restart the ci check?


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



[GitHub] [tvm] masahi merged pull request #9995: [BYOC-DNNL] add support for more ops and fusion patterns

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #9995:
URL: https://github.com/apache/tvm/pull/9995


   


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