You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2021/06/22 17:37:57 UTC
[tvm] branch main updated: Check for presence of LLVM
configuration. (#8293)
This is an automated email from the ASF dual-hosted git repository.
tqchen 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 d5cc07e Check for presence of LLVM configuration. (#8293)
d5cc07e is described below
commit d5cc07e9169abfb7b9c3a9989ab2274de4d8c55c
Author: Ramana Radhakrishnan <ra...@arm.com>
AuthorDate: Tue Jun 22 18:37:38 2021 +0100
Check for presence of LLVM configuration. (#8293)
LLVM is a pre-requisite for configuring Compute Library
and offloading to Ethos-N NPU.
Better to get the error message at build time rather
than debugging SEGVs in testsuites.
---
cmake/modules/contrib/ArmComputeLib.cmake | 4 ++++
cmake/modules/contrib/EthosN.cmake | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/cmake/modules/contrib/ArmComputeLib.cmake b/cmake/modules/contrib/ArmComputeLib.cmake
index 54ce917..9f6b9c1 100644
--- a/cmake/modules/contrib/ArmComputeLib.cmake
+++ b/cmake/modules/contrib/ArmComputeLib.cmake
@@ -27,6 +27,10 @@ if(USE_ARM_COMPUTE_LIB)
if(NOT USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR)
list(APPEND COMPILER_SRCS ${ACL_RUNTIME_MODULE})
endif()
+ if(NOT DEFINED TVM_LLVM_VERSION)
+ message(FATAL_ERROR "Support for offloading to Compute library for the Arm Architecture requires LLVM Support")
+ endif()
+
message(STATUS "Build with Arm Compute Library support...")
endif()
diff --git a/cmake/modules/contrib/EthosN.cmake b/cmake/modules/contrib/EthosN.cmake
index 44d2a2a..6eb5271 100644
--- a/cmake/modules/contrib/EthosN.cmake
+++ b/cmake/modules/contrib/EthosN.cmake
@@ -20,6 +20,10 @@
if(NOT USE_ETHOSN STREQUAL "OFF")
find_ethosn(${USE_ETHOSN})
+ if(NOT DEFINED TVM_LLVM_VERSION)
+ message(FATAL_ERROR "Support for offloading to Ethos-N requires LLVM Support")
+ endif()
+
if(NOT ETHOSN_FOUND)
message(FATAL_ERROR "Cannot find Ethos-N, USE_ETHOSN=" ${USE_ETHOSN})