diff --git a/tests/cpp/relay_build_module_test.cc b/tests/cpp/relay_build_module_test.cc index 5de4ada6cb7b7..b8d9063ac42de 100644 --- a/tests/cpp/relay_build_module_test.cc +++ b/tests/cpp/relay_build_module_test.cc @@ -115,7 +115,7 @@ TEST(Relay, BuildModule) { Map 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(); diff --git a/tests/cpp/relay_pass_type_infer_test.cc b/tests/cpp/relay_pass_type_infer_test.cc index cb7330dfab6da..e6af3c55d07f3 100644 --- a/tests/cpp/relay_pass_type_infer_test.cc +++ b/tests/cpp/relay_pass_type_infer_test.cc @@ -34,7 +34,7 @@ TEST(Relay, SelfReference) { auto y = relay::Var("y", tensor_type); auto call = relay::Call(f, Array{y}); auto fx = relay::Function(tvm::Array{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"); diff --git a/tests/cpp/relay_transform_sequential_test.cc b/tests/cpp/relay_transform_sequential_test.cc index 1a12aec7054db..51961ee4afefa 100644 --- a/tests/cpp/relay_transform_sequential_test.cc +++ b/tests/cpp/relay_transform_sequential_test.cc @@ -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)); @@ -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));