aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorMatthew Sloyan <matthew.sloyan@arm.com>2022-10-10 12:42:16 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2022-10-27 12:03:21 +0100
commitd646b5504351ab3c3ab8152553465c8e36947e5b (patch)
treed67eb1a4f18b9cff1c5e5ff067ba4c4b92bff561 /cmake
parent6a76e562019ef492a39d21de6850534d0a561782 (diff)
downloadarmnn-d646b5504351ab3c3ab8152553465c8e36947e5b.tar.gz
IVGCVSW-7273 Integrate TOSA Reference Model into Arm NN
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ie9aa1aa20a5bc837e005a7a36d4d07b4cd8d021b
Diffstat (limited to 'cmake')
-rw-r--r--cmake/GlobalConfig.cmake25
1 files changed, 19 insertions, 6 deletions
diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake
index 9137fa33d8..fb70d1a0e0 100644
--- a/cmake/GlobalConfig.cmake
+++ b/cmake/GlobalConfig.cmake
@@ -11,7 +11,7 @@ option(BUILD_FOR_COVERAGE "Use no optimization and output .gcno and .gcda files"
option(ARMCOMPUTENEON "Build with ARM Compute NEON support" OFF)
option(ARMCOMPUTECL "Build with ARM Compute OpenCL support" OFF)
option(ARMNNREF "Build with ArmNN reference support" ON)
-option(ARMNNTOSAREF "Build with Tosa reference support" OFF)
+option(ARMNNTOSAREF "Build with TOSA reference support" OFF)
option(PROFILING_BACKEND_STREAMLINE "Forward the armNN profiling events to DS-5/Streamline as annotations" OFF)
# options used for heap profiling and leak checking
option(HEAP_PROFILING "Build with heap profiling enabled" OFF)
@@ -24,7 +24,8 @@ option(BUILD_ACCURACY_TOOL "Build Accuracy Tool" OFF)
option(FLATC_DIR "Path to Flatbuffers compiler" OFF)
option(TF_LITE_GENERATED_PATH "Tensorflow lite generated C++ schema location" OFF)
option(FLATBUFFERS_ROOT "Location where the flatbuffers 'include' and 'lib' folders to be found" Off)
-option(TOSA_SERIALIZATION_LIB_ROOT "Location where the TOSA serialization library 'include' and 'lib' folders can be found" OFF)
+option(TOSA_SERIALIZATION_LIB_ROOT "Location where the TOSA Serialization Library 'include' and 'lib' folders can be found" OFF)
+option(TOSA_REFERENCE_MODEL_ROOT "Location where the TOSA Reference Model 'include' and 'lib' folders can be found" OFF)
option(DYNAMIC_BACKEND_PATHS "Colon seperated list of paths where to load the dynamic backends from" "")
option(SAMPLE_DYNAMIC_BACKEND "Include the sample dynamic backend and its tests in the build" OFF)
option(BUILD_GATORD_MOCK "Build the Gatord simulator for external profiling testing." ON)
@@ -341,14 +342,26 @@ if(ARMNNTOSAREF)
# Locate the includes for the TOSA serialization library.
message(STATUS "TOSA serialization library root set to ${TOSA_SERIALIZATION_LIB_ROOT}")
- find_path(TOSA_SERIALIZATION_LIB_INCLUDE tosa_serialization_handler.h HINTS
- ${TOSA_SERIALIZATION_LIB_ROOT}/include)
+ find_path(TOSA_SERIALIZATION_LIB_INCLUDE tosa_serialization_handler.h
+ HINTS ${TOSA_SERIALIZATION_LIB_ROOT}/include)
message(STATUS "TOSA serialization library include directory located at: ${TOSA_SERIALIZATION_LIB_INCLUDE}")
find_library(TOSA_SERIALIZATION_LIB
- NAMES tosa_serialization_lib.a tosa_serialization_lib
- HINTS ${TOSA_SERIALIZATION_LIB_ROOT}/lib /usr/local/lib /usr/lib)
+ NAMES tosa_serialization_lib.a tosa_serialization_lib
+ HINTS ${TOSA_SERIALIZATION_LIB_ROOT}/lib /usr/local/lib /usr/lib)
message(STATUS "TOSA serialization library set to ${TOSA_SERIALIZATION_LIB}")
+
+ # Next, locate the includes for the TOSA Reference Model.
+ message(STATUS "TOSA Reference Model root set to ${TOSA_REFERENCE_MODEL_ROOT}")
+
+ find_path(TOSA_REFERENCE_MODEL_INCLUDE model_runner.h
+ HINTS ${TOSA_REFERENCE_MODEL_ROOT}/include)
+ message(STATUS "TOSA Reference Model include directory located at: ${TOSA_REFERENCE_MODEL_INCLUDE}")
+
+ find_library(TOSA_REFERENCE_MODEL_LIB
+ NAMES tosa_reference_model_lib.a tosa_reference_model_lib
+ HINTS ${TOSA_REFERENCE_MODEL_ROOT}/lib /usr/local/lib /usr/lib)
+ message(STATUS "TOSA Reference Model set to ${TOSA_REFERENCE_MODEL_LIB}")
endif()
# This is the root for the dynamic backend tests to search for dynamic