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

liuyizhi pushed a commit to branch v0.6
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/v0.6 by this push:
     new b9b2e47  [BACKPORT-0.6][Fix][VM] Fix copy constructor (#5867)
b9b2e47 is described below

commit b9b2e47f48115319b0e54f02e7fcd865c31a629b
Author: Yizhi Liu <[email protected]>
AuthorDate: Sun Jun 21 13:30:05 2020 -0700

    [BACKPORT-0.6][Fix][VM] Fix copy constructor (#5867)
    
    Co-authored-by: ga <[email protected]>
---
 src/runtime/vm/vm.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/runtime/vm/vm.cc b/src/runtime/vm/vm.cc
index 333dd1e..d263fd9 100644
--- a/src/runtime/vm/vm.cc
+++ b/src/runtime/vm/vm.cc
@@ -168,7 +168,7 @@ Instruction& Instruction::operator=(const Instruction& 
instr) {
       this->result = instr.result;
       return *this;
     case Opcode::AllocTensor:
-      this->alloc_tensor.storage = this->alloc_tensor.storage;
+      this->alloc_tensor.storage = instr.alloc_tensor.storage;
       this->alloc_tensor.ndim = instr.alloc_tensor.ndim;
       this->alloc_tensor.shape = Duplicate<int64_t>(instr.alloc_tensor.shape,
                                                     instr.alloc_tensor.ndim);

Reply via email to