This is an automated email from the ASF dual-hosted git repository. andrewzhaoluo pushed a commit to branch aluo/rebase-08312022-autotensorization-fq2i-changes in repository https://gitbox.apache.org/repos/asf/tvm.git
commit ac675efd907abd6d7ee2167f08de40d121d1c1ac Author: Andrew Zhao Luo <[email protected]> AuthorDate: Fri Sep 2 12:37:50 2022 -0700 optional cast --- 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 e27449ac43..67909b04b8 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) + cdiff = is_op("cast")(diff) | diff # cast does not need to be here usually const_two = ( is_expr(relay.const(2)) | is_expr(relay.const(2.0))
