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 2021/02/27 06:21:32 UTC

[tvm] branch main updated: [Torch] Simplify contiguous (#7544)

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 22ba2c4  [Torch] Simplify contiguous (#7544)
22ba2c4 is described below

commit 22ba2c42ac3f35f9366327197448cfc62a3dabd3
Author: Cody Yu <co...@gmail.com>
AuthorDate: Fri Feb 26 22:21:15 2021 -0800

    [Torch] Simplify contiguous (#7544)
---
 python/tvm/relay/frontend/pytorch.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/python/tvm/relay/frontend/pytorch.py b/python/tvm/relay/frontend/pytorch.py
index a471639..31c78cf 100644
--- a/python/tvm/relay/frontend/pytorch.py
+++ b/python/tvm/relay/frontend/pytorch.py
@@ -1004,8 +1004,7 @@ class PyTorchOpConverter:
         return _op.nn.relu(data)
 
     def contiguous(self, inputs, input_types):
-        data = inputs[0]
-        return _op.tensor.copy(data)
+        return inputs[0]
 
     def batch_norm(self, inputs, input_types):
         data = inputs[0]