OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[CPU] Restore ACL cmake build (#33186)
Arseniy Obolenskiy044c19a643d6
diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txtindex 8911887455c..2a8b9106d6a 100644--- a/src/plugins/intel_cpu/CMakeLists.txt+++ b/src/plugins/intel_cpu/CMakeLists.txt@@ -441,6 +441,16 @@ if(BUILD_SHARED_LIBS)ov_build_target_faster(${TARGET_NAME}_obj PCH PCH_EXCLUDE ${PCH_EXCLUDE_FILES})endif()+if(OV_CPU_WITH_ACL)+ target_include_directories(${TARGET_NAME} PRIVATE+ ${OpenVINO_SOURCE_DIR}/src/inference/include)++ if(BUILD_SHARED_LIBS)+ target_include_directories(${TARGET_NAME}_obj PRIVATE+ ${OpenVINO_SOURCE_DIR}/src/inference/include)+ endif()+endif()+if(ENABLE_TESTS)add_subdirectory(tests)endif()diff --git a/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake b/src/plugins/intel_cpu/thirdparty/ACLConfig.cmakeindex aa7f41099d1..33225b770f1 100644--- a/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake+++ b/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake@@ -64,6 +64,10 @@ if(ARM_COMPUTE_INCLUDE_DIR OR ARM_COMPUTE_LIB_DIR)$<TARGET_PROPERTY:${acl_library},INTERFACE_INCLUDE_DIRECTORIES>)endforeach()+ if(ARM_COMPUTE_INCLUDE_DIR)+ set(ACL_INCLUDE_DIR "${ARM_COMPUTE_INCLUDE_DIR}")+ endif()+# ------------------------------------------------------------------------------# Mode 2: Build ACL using CMake# ------------------------------------------------------------------------------@@ -73,20 +77,30 @@ elseif(ENABLE_ARM_COMPUTE_CMAKE)function(ov_build_compute_library)# Configure ComputeLibrary build- set(BUILD_SHARED_LIBS OFF)+ set(ARM_COMPUTE_BUILD_SHARED_LIB OFF CACHE BOOL "" FORCE)set(ARM_COMPUTE_GRAPH_ENABLED OFF CACHE BOOL "" FORCE)- set(OPENMP OFF CACHE BOOL "" FORCE)- set(CPPTHREADS OFF CACHE BOOL "" FORCE)+ set(ARM_COMPUTE_ENABLE_OPENMP OFF CACHE BOOL "" FORCE)+ set(ARM_COMPUTE_ENABLE_CPPTHREADS OFF CACHE BOOL "" FORCE)# SVE is not supported on Darwin- if(CMAKE_HOST_APPLE)+ if(APPLE)set(ENABLE_SVE OFF CACHE BOOL "" FORCE)set(ARM_COMPUTE_ENABLE_SVE OFF CACHE BOOL "" FORCE)+ set(ARM_COMPUTE_ENABLE_SVE2 OFF CACHE BOOL "" FORCE)set(ARM_COMPUTE_ENABLE_SVEF32MM OFF CACHE BOOL "" FORCE)endif()+ # Multi-ISA support with SME+ if(NOT ARM AND OV_CPU_AARCH64_USE_MULTI_ISA)+ add_compile_definitions(ENABLE_SME ARM_COMPUTE_ENABLE_SME ARM_COMPUTE_ENABLE_SME2)+ endif()+add_subdirectory(${ARM_COMPUTE_SOURCE_DIR} ${ARM_COMPUTE_BINARY_DIR} EXCLUDE_FROM_ALL)+ if(NOT TARGET arm_compute::arm_compute)+ add_library(arm_compute::arm_compute ALIAS arm_compute)+ endif()+add_library(ArmCompute::Half INTERFACE IMPORTED GLOBAL)set_target_properties(ArmCompute::Half PROPERTIESINTERFACE_INCLUDE_DIRECTORIES "${ARM_COMPUTE_SOURCE_DIR}/include")@@ -96,13 +110,14 @@ elseif(ENABLE_ARM_COMPUTE_CMAKE)# Setup for oneDNN integrationset(ACL_FOUND ON)- set(ACL_LIBRARIES arm_compute_core ArmCompute::Half)+ set(ACL_LIBRARIES ArmCompute::Core ArmCompute::Half)foreach(acl_library IN LISTS ACL_LIBRARIES)list(APPEND ACL_INCLUDE_DIRS$<TARGET_PROPERTY:${acl_library},INTERFACE_INCLUDE_DIRECTORIES>)endforeach()+ set(ACL_INCLUDE_DIR "${ARM_COMPUTE_SOURCE_DIR}")set(ENV{ACL_ROOT_DIR} "${ARM_COMPUTE_SOURCE_DIR}")# ------------------------------------------------------------------------------