You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ma...@apache.org on 2022/04/04 00:38:26 UTC

[tvm] branch main updated: Optimize the implmentation of scale (#10884)

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

masahi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 6d8cb6072b Optimize the implmentation of scale (#10884)
6d8cb6072b is described below

commit 6d8cb6072b79801f8547474236323e05dbd3aed9
Author: heliqi <11...@qq.com>
AuthorDate: Mon Apr 4 08:38:17 2022 +0800

    Optimize the implmentation of scale (#10884)
---
 python/tvm/relay/frontend/paddlepaddle.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/relay/frontend/paddlepaddle.py b/python/tvm/relay/frontend/paddlepaddle.py
index 7823682c9c..1084826911 100644
--- a/python/tvm/relay/frontend/paddlepaddle.py
+++ b/python/tvm/relay/frontend/paddlepaddle.py
@@ -1672,7 +1672,7 @@ def convert_scale(g, op, block):
     bias_after_scale = op.attr("bias_after_scale")
     x = g.get_node(op.input("X")[0])
     if np.isclose(scale, 1.0) and np.isclose(bias, 0.0):
-        out = _op.copy(x)
+        out = x
     else:
         if np.isclose(bias, 0.0):
             out = x * _expr.const(np.array(scale).astype("float32"))