This is an automated email from the ASF dual-hosted git repository.
kparzysz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 2df4524e04 [Hexagon] Tighten requirements on inclusion of runtime
sources (#11635)
2df4524e04 is described below
commit 2df4524e04cf48f759175a746632efe6ff0a7ea6
Author: Chris Sullivan <[email protected]>
AuthorDate: Mon Jun 13 07:00:34 2022 -0700
[Hexagon] Tighten requirements on inclusion of runtime sources (#11635)
* Tighten requirements on when Hexagon runtime sources
are included in the runtime build. Specifically only include them
when building for hexagon rpc on hardware and do not include them
for x86 (host, simulator) or android builds.
* Remove device_api.cpu binding to hexagon in simulator rpc session.
Co-authored-by: Adam Straw <[email protected]>
Co-authored-by: Karl Koscher <[email protected]>
* if(BUILD_FOR_HEXAGON)
Co-authored-by: Adam Straw <[email protected]>
Co-authored-by: Karl Koscher <[email protected]>
---
cmake/modules/Hexagon.cmake | 2 +-
src/runtime/hexagon/rpc/simulator/session.cc | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/cmake/modules/Hexagon.cmake b/cmake/modules/Hexagon.cmake
index 03ab62de66..6e9b7dc70c 100644
--- a/cmake/modules/Hexagon.cmake
+++ b/cmake/modules/Hexagon.cmake
@@ -116,7 +116,7 @@ function(add_hexagon_wrapper_paths)
link_directories("${HEXAGON_TOOLCHAIN}/lib/iss")
endfunction()
-if(BUILD_FOR_HEXAGON OR USE_HEXAGON_RPC)
+if(BUILD_FOR_HEXAGON)
# Common sources for TVM runtime with Hexagon support
file_glob_append(RUNTIME_HEXAGON_SRCS
"${TVMRT_SOURCE_DIR}/hexagon/*.cc"
diff --git a/src/runtime/hexagon/rpc/simulator/session.cc
b/src/runtime/hexagon/rpc/simulator/session.cc
index 7d88bbb748..0469ad5e6e 100644
--- a/src/runtime/hexagon/rpc/simulator/session.cc
+++ b/src/runtime/hexagon/rpc/simulator/session.cc
@@ -568,10 +568,6 @@ detail::Optional<HEXAPI_Cpu>
SimulatorRPCChannel::GetCPU(const detail::MaybeStri
}
SimulatorRPCChannel::SimulatorRPCChannel(int stack_size, std::string args) {
- const auto* api = tvm::runtime::Registry::Get("device_api.hexagon");
- ICHECK(api != nullptr);
- tvm::runtime::Registry::Register("device_api.cpu", true).set_body(*api);
-
const char* sdk_root_env = std::getenv("HEXAGON_SDK_ROOT");
ICHECK(sdk_root_env != nullptr) << "Please set HEXAGON_SDK_ROOT";
const char* toolchain_env = std::getenv("HEXAGON_TOOLCHAIN");