Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MarisaKirisame committed Aug 21, 2020
1 parent 27c6bdd commit 2b29d7a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/cpp/relay_build_module_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TEST(Relay, BuildModule) {
Map<tvm::Integer, tvm::Target> targets;
Target llvm_tgt = Target::Create("llvm");
targets.Set(0, llvm_tgt);
auto relay_mod = tvm::IRModule::FromExpr(func);
auto relay_mod = tvm::IRModule::FromFunc(func);
build_f(relay_mod, targets, llvm_tgt);
std::string json = json_f();
tvm::runtime::Module mod = mod_f();
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/relay_pass_type_infer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST(Relay, SelfReference) {
auto y = relay::Var("y", tensor_type);
auto call = relay::Call(f, Array<relay::Expr>{y});
auto fx = relay::Function(tvm::Array<relay::Var>{y}, call, relay::Type(), {});
auto mod = IRModule::FromExpr(fx);
auto mod = IRModule::FromFunc(fx);
mod = relay::transform::InferType()(mod);
auto type_fx = mod->Lookup("main");

Expand Down
4 changes: 2 additions & 2 deletions tests/cpp/relay_transform_sequential_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ TEST(Relay, Sequential) {
relay::transform::InferType(), relay::transform::DeadCodeElimination(),
relay::transform::EliminateCommonSubexpr(), relay::transform::AlterOpLayout()};
relay::transform::Pass seq = relay::transform::Sequential(pass_seqs);
auto mod = IRModule::FromExpr(func);
auto mod = IRModule::FromFunc(func);
auto pass_ctx = relay::transform::PassContext::Create();
pass_ctx->opt_level = 3;
pass_ctx->config.Set("relay.fallback_device_type", Integer(1));
Expand All @@ -115,7 +115,7 @@ TEST(Relay, Sequential) {
relay::Function expected_func = relay::Function(relay::FreeVars(zz), zz, relay::Type(), {});

// Infer type for the expected function.
auto mod1 = IRModule::FromExpr(expected_func);
auto mod1 = IRModule::FromFunc(expected_func);
mod1 = relay::transform::InferType()(mod1);
auto expected = mod1->Lookup("main");
CHECK(tvm::StructuralEqual()(f, expected));
Expand Down

0 comments on commit 2b29d7a

Please sign in to comment.