This is an automated email from the ASF dual-hosted git repository.

andrewzhaoluo pushed a commit to branch aluo/rebase-09162022-autotensorization
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 731061b25d399aaf6b0ba4dbb04b9deda20f1974
Author: Andrew Zhao Luo <[email protected]>
AuthorDate: Thu Sep 1 21:46:53 2022 -0700

    dnnl pattern matching
---
 python/tvm/relay/op/contrib/dnnl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/relay/op/contrib/dnnl.py 
b/python/tvm/relay/op/contrib/dnnl.py
index 67909b04b8..e27449ac43 100644
--- a/python/tvm/relay/op/contrib/dnnl.py
+++ b/python/tvm/relay/op/contrib/dnnl.py
@@ -831,7 +831,7 @@ class LayerNormRewritePattern1(DFPatternCallback):
         self.beta = wildcard()
         mu = is_op("mean")(self.data)
         diff = is_op("subtract")(self.data, mu)
-        cdiff = is_op("cast")(diff) | diff  # cast does not need to be here 
usually
+        cdiff = is_op("cast")(diff)
         const_two = (
             is_expr(relay.const(2))
             | is_expr(relay.const(2.0))

Reply via email to