Skip to content

Commit

Permalink
Check for presence of LLVM configuration. (apache#8293)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ramana Radhakrishnan authored and ylc committed Sep 29, 2021
1 parent 0ade5b7 commit 9b921ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/modules/contrib/ArmComputeLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
4 changes: 4 additions & 0 deletions cmake/modules/contrib/EthosN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down

0 comments on commit 9b921ae

Please sign in to comment.