From 22107e251af9d0b589ea8c47c53c2a6095333272 Mon Sep 17 00:00:00 2001 From: Colm Donelan Date: Tue, 23 Apr 2024 14:19:22 +0100 Subject: Add a build option to enable the OpenMP scheduler in ACL. Signed-off-by: Colm Donelan Change-Id: I75ee45444cd2f7b895e564e78c29fe67c1a8a4fc --- CMakeLists.txt | 4 ++++ cmake/GlobalConfig.cmake | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f6a84dd86..660b7555ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -528,6 +528,10 @@ install(DIRECTORY profiling/common/include/ DESTINATION ${CMAKE_INSTALL_INCLUDED install(DIRECTORY profiling/client/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/armnn/profiling/client/include) if(ARMCOMPUTENEON OR ARMCOMPUTECL OR ARMCOMPUTEGPUFSA) + if (BUILD_ACL_OPENMP) + target_link_libraries(armnn PUBLIC -fopenmp -static-openmp ) + target_compile_options(armnn PUBLIC -fopenmp) + endif() target_link_libraries(armnn PUBLIC ${ARMCOMPUTE_LIBRARIES}) endif() diff --git a/cmake/GlobalConfig.cmake b/cmake/GlobalConfig.cmake index b37417c7cf..feeaef1c60 100644 --- a/cmake/GlobalConfig.cmake +++ b/cmake/GlobalConfig.cmake @@ -45,6 +45,8 @@ option(BUILD_BARE_METAL "Disable features requiring operating system support" OF option(BUILD_SHARED_LIBS "Determines if Armnn will be built statically or dynamically. 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) 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 -- cgit v1.2.1