From 9a52a0de5cb5f39a927defed2166855c112b08e3 Mon Sep 17 00:00:00 2001 From: Jared Roesch Date: Thu, 6 Dec 2018 22:12:50 -0800 Subject: [PATCH] Hacking (#35) Repair layout issue --- src/relay/backend/interpreter.cc | 2 ++ src/relay/op/nn/convolution.cc | 1 + src/relay/op/tensor/transform.cc | 2 +- tests/python/relay/test_ir_nodes.py | 3 +++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/relay/backend/interpreter.cc b/src/relay/backend/interpreter.cc index 734180c537596..88a0f45ebbd91 100644 --- a/src/relay/backend/interpreter.cc +++ b/src/relay/backend/interpreter.cc @@ -9,6 +9,7 @@ #include #include #include +#include #include "compile_engine.h" namespace tvm { @@ -192,6 +193,7 @@ class Interpreter : } Value Eval(const Expr& expr) { + RELAY_LOG(INFO) << "Eval: expr_ptr=" << expr.get() << std::endl; return (*this)(expr); } diff --git a/src/relay/op/nn/convolution.cc b/src/relay/op/nn/convolution.cc index 170b6b6d13c5c..0fe3a7ccb6815 100644 --- a/src/relay/op/nn/convolution.cc +++ b/src/relay/op/nn/convolution.cc @@ -62,6 +62,7 @@ bool Conv2DRel(const Array& types, channels = param->channels; dilated_ksize_y = 1 + (param->kernel_size[0] - 1) * param->dilation[0]; dilated_ksize_x = 1 + (param->kernel_size[1] - 1) * param->dilation[1]; + // assign result to reporter reporter->Assign(types[1], TensorTypeNode::make(wshape, data->dtype)); } else { diff --git a/src/relay/op/tensor/transform.cc b/src/relay/op/tensor/transform.cc index 76aaab77d6055..df7ae388162bd 100644 --- a/src/relay/op/tensor/transform.cc +++ b/src/relay/op/tensor/transform.cc @@ -1728,7 +1728,7 @@ Expr MakeBitPack(Expr data, int lanes) { TVM_REGISTER_API("relay.op._make.bitpack") .set_body([](const TVMArgs& args, TVMRetValue* rv) { - runtime::detail::unpack_call(MakeBitPack, args, rv); + runtime::detail::unpack_call(MakeBitPack, args, rv); }); RELAY_REGISTER_OP("bitpack") diff --git a/tests/python/relay/test_ir_nodes.py b/tests/python/relay/test_ir_nodes.py index e041acca0e0c4..c797ee0b4340f 100644 --- a/tests/python/relay/test_ir_nodes.py +++ b/tests/python/relay/test_ir_nodes.py @@ -209,6 +209,9 @@ def test_tuple_get_item(): str(get) check_json_roundtrip(get) +def test_op(): + add = op.op.get("add") + check_json_roundtrip(add) def test_op(): add = op.op.get("add")