From ca458a08a0030d6af489313abd4f8e483ca8f47a Mon Sep 17 00:00:00 2001 From: Christopher Sidebottom Date: Thu, 11 Nov 2021 23:47:02 +0000 Subject: [PATCH] [Relay] Use target_host determined at Relay level instead of recalculating it (#9499) --- src/relay/backend/build_module.cc | 2 +- tests/python/driver/tvmc/test_compiler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relay/backend/build_module.cc b/src/relay/backend/build_module.cc index 78978e192f0e..4dd12ad1d106 100644 --- a/src/relay/backend/build_module.cc +++ b/src/relay/backend/build_module.cc @@ -501,7 +501,7 @@ class RelayBuildModule : public runtime::ModuleNode { ret_.mod = tvm::codegen::CSourceModuleCreate(";", "", Array{}); } } else { - ret_.mod = tvm::build(lowered_funcs, target_host_); + ret_.mod = tvm::build(lowered_funcs, target_host); } auto ext_mods = executor_codegen_->GetExternalModules(); diff --git a/tests/python/driver/tvmc/test_compiler.py b/tests/python/driver/tvmc/test_compiler.py index 7dd65c507df3..2ef84d7f1a6f 100644 --- a/tests/python/driver/tvmc/test_compiler.py +++ b/tests/python/driver/tvmc/test_compiler.py @@ -416,7 +416,7 @@ def test_compile_tflite_module_with_external_codegen_cmsisnn( for name in mlf_package.getnames() if re.match(r"\./codegen/host/src/\D+\d+\.c", name) ] - assert len(c_source_files) == 4 + assert len(c_source_files) == 3 @pytest.mark.skipif(