From 6b0edc28c85d79d01d36d08fc6ff09d94570e569 Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Fri, 1 Mar 2019 10:34:02 -0800 Subject: [PATCH] Fix move (#20) --- src/relay/vm/vm.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/relay/vm/vm.cc b/src/relay/vm/vm.cc index 90afc5ae11ae..71969edcc72c 100644 --- a/src/relay/vm/vm.cc +++ b/src/relay/vm/vm.cc @@ -462,6 +462,12 @@ typename std::enable_if::type VirtualMachine::DumpStack() { RELAY_LOG(INFO) << " \n"; break; } + case VMObjectTag::kDatatype: { + VMDatatypeCell* datatype = (VMDatatypeCell*)stack[i].operator->(); + std::cout << "fields: " << datatype->fields.size(); + std::cout << "\n"; + break; + } default: { RELAY_LOG(INFO) << "\n"; } @@ -616,7 +622,7 @@ void VirtualMachine::Run() { CHECK(instr.dest < stack.size()) << "dest=" << instr.dest << " stack_size=" << stack.size(); - stack[instr.dest] = stack[instr.source]; + stack[bp + instr.dest] = stack[bp + instr.source]; DumpStack(); pc++; goto main_loop;