aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColm Donelan <colm.donelan@arm.com>2024-04-30 09:44:14 +0100
committerColm Donelan <colm.donelan@arm.com>2024-05-08 08:28:04 +0000
commit8208e2b8b1d09d0e89394ae134eb61e390dfd93c (patch)
tree7b6408bcbcda989bf726da77a04e50ff992ae668
parentf5fa0dbb9a1b2918f3e391bb7a7c895f23fcbf65 (diff)
downloadarmnn-8208e2b8b1d09d0e89394ae134eb61e390dfd93c.tar.gz
MLCE-1271 Enable ACL build with OpenMP as default scheduler.
Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I7d1156812c8765ffccd1cc2cabd4f9450f14f676
-rw-r--r--CMakeLists.txt8
-rw-r--r--cmake/GlobalConfig.cmake2
2 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 660b7555ef..a14c500bc6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -529,8 +529,12 @@ install(DIRECTORY profiling/client/include/ DESTINATION ${CMAKE_INSTALL_INCLUDED
if(ARMCOMPUTENEON OR ARMCOMPUTECL OR ARMCOMPUTEGPUFSA)
if (BUILD_ACL_OPENMP)
- target_link_libraries(armnn PUBLIC -fopenmp -static-openmp )
- target_compile_options(armnn PUBLIC -fopenmp)
+ if (("${CMAKE_SYSTEM_NAME}" STREQUAL Android))
+ target_link_libraries(armnn PUBLIC -fopenmp -static-openmp)
+ else() # Assumes GCC on aarch64.
+ target_compile_options(armnn PUBLIC -fopenmp)
+ target_link_libraries(armnn PUBLIC -lgomp)
+ endif()
endif()
target_link_libraries(armnn PUBLIC ${ARMCOMPUTE_LIBRARIES})
endif()
diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake
index feeaef1c60..687fd05400 100644
--- a/cmake/GlobalConfig.cmake
+++ b/cmake/GlobalConfig.cmake
@@ -46,7 +46,7 @@ option(BUILD_SHARED_LIBS "Determines if Armnn will be built statically or dynami
This is an experimental feature and not fully supported.
Only the ArmNN core and the Delegate can be built statically." ON)
option(BUILD_ACL_OPENMP "If enabled statically link the OpenMP scheduler for ACL.
- Note: ACL must already be built with openmp=1 cppthreads=0" OFF)
+ Note: ACL must already be built with openmp=1 cppthreads=0" ON)
option(EXECUTE_NETWORK_STATIC " This is a limited experimental build that is entirely static.
It currently only supports being set by changing the current CMake default options like so:
BUILD_TF_LITE_PARSER=1/0