diff --git a/.ci/azure/linux_arm64.yml b/.ci/azure/linux_arm64.yml index 62840d46200de5..7bc82c22d874d2 100644 --- a/.ci/azure/linux_arm64.yml +++ b/.ci/azure/linux_arm64.yml @@ -148,7 +148,9 @@ jobs: - script: | set -e - git submodule update --init -- $(OPENVINO_REPO_DIR)/src/plugins + git submodule update --init -- $(OPENVINO_REPO_DIR)/src/plugins/intel_gpu + git submodule update --init -- $(OPENVINO_REPO_DIR)/src/plugins/intel_cpu/thirdparty/mlas + git submodule update --init -- $(OPENVINO_REPO_DIR)/src/plugins/intel_cpu/thirdparty/onednn git submodule update --init -- $(OPENVINO_REPO_DIR)/thirdparty/gtest git submodule update --init -- $(OPENVINO_REPO_DIR)/thirdparty/open_model_zoo displayName: 'Init submodules for non Conan dependencies' diff --git a/conan.lock b/conan.lock index 81f455dd8efbd7..85070f0cafad28 100644 --- a/conan.lock +++ b/conan.lock @@ -18,10 +18,12 @@ "hwloc/2.9.2#1c63e2eccac57048ae226e6c946ebf0e%1688677682.002", "gflags/2.2.2#48d1262ffac8d30c3224befb8275a533%1676224985.343", "flatbuffers/23.5.26#b153646f6546daab4c7326970b6cd89c%1685838458.449", + "compute_library/23.08#6942370724cbbaf7848925eef9ffdf0c%1695152537.14029", "ade/0.1.2c#8c03c130df6dc35186b38ba73a40a71d%1694253992.577" ], "build_requires": [ "zlib/1.2.13#97d5730b529b4224045fe7090592d4c1%1692672717.049", + "scons/4.3.0#3476cd7ed0d4f2913159fb38dd8d8b7d%1687272946.0", "protobuf/3.21.12#d9f5f4e3b86552552dda4c0a2e928eeb%1685218275.69", "protobuf/3.21.9#515ceb0a1653cf84363d9968b812d6be%1678364058.993", "pkgconf/1.9.5#743ca0d41d35a84b1f89af337ddaa1a0%1688570267.802", diff --git a/conanfile.txt b/conanfile.txt index 2fc71b7f384f0c..8b14f3c9885873 100644 --- a/conanfile.txt +++ b/conanfile.txt @@ -14,6 +14,7 @@ onnx/1.14.1 nlohmann_json/[>=3.1.1] pybind11/[>=2.10.1] flatbuffers/[>=22.9.24] +compute_library/23.08 [tool_requires] cmake/[>=3.20] diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt index 72784b793277c8..3355a1ff8831a6 100644 --- a/src/plugins/intel_cpu/CMakeLists.txt +++ b/src/plugins/intel_cpu/CMakeLists.txt @@ -46,6 +46,8 @@ else() endif() ie_option(ENABLE_MLAS_FOR_CPU "Enable MLAS for OpenVINO CPU Plugin" ${ENABLE_MLAS_FOR_CPU_DEFAULT}) +set(OV_CPU_WITH_DNNL ON) + add_subdirectory(thirdparty) if(WIN32) @@ -56,7 +58,6 @@ if(ENABLE_CPU_DEBUG_CAPS) add_definitions(-DCPU_DEBUG_CAPS) endif() -set(OV_CPU_WITH_DNNL ON) if(OV_CPU_WITH_DNNL) add_definitions(-DOV_CPU_WITH_DNNL) endif() @@ -128,6 +129,7 @@ if (ENABLE_MLAS_FOR_CPU) add_definitions(-DOV_CPU_WITH_MLAS) endif() target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $) + # Cross compiled function # TODO: The same for proposal, proposalONNX, topk cross_compiled_file(${TARGET_NAME} @@ -140,6 +142,10 @@ cross_compiled_file(${TARGET_NAME} # system dependencies must go last target_link_libraries(${TARGET_NAME} PRIVATE openvino::pugixml) +if(OV_CPU_WITH_ACL) + target_link_libraries(${TARGET_NAME} PRIVATE arm_compute::arm_compute) +endif() + ov_set_threading_interface_for(${TARGET_NAME}) # must be called after all target_link_libraries diff --git a/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake b/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake index b2614a73014b50..461f61cb687322 100644 --- a/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake +++ b/src/plugins/intel_cpu/thirdparty/ACLConfig.cmake @@ -2,7 +2,27 @@ # SPDX-License-Identifier: Apache-2.0 # -if(ARM_COMPUTE_INCLUDE_DIR OR ARM_COMPUTE_LIB_DIR) +# conan has a recipe 'compute_library' +find_package(compute_library QUIET CONFIG) + +if(compute_library_FOUND) + if(NOT TARGET arm_compute) + add_library(arm_compute INTERFACE) + add_library(arm_compute::arm_compute ALIAS arm_compute) + target_link_libraries(arm_compute INTERFACE compute_library::compute_library) + endif() + + # for oneDNN integration + set(ACL_FOUND ON) + set(ACL_LIBRARIES arm_compute::arm_compute) + + foreach(acl_library IN LISTS ACL_LIBRARIES) + list(APPEND ACL_INCLUDE_DIRS $) + endforeach() + + # required by oneDNN to attempt to parse ACL version - set dummy folder + set(ENV{ACL_ROOT_DIR} "${CMAKE_CURRENT_SOURCE_DIR}") +elseif(ARM_COMPUTE_INCLUDE_DIR OR ARM_COMPUTE_LIB_DIR) set(ARM_COMPUTE_INCLUDE_DIR "" CACHE PATH "Path to ARM Compute Library headers" FORCE) if(NOT ARM_COMPUTE_LIB_DIR) diff --git a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt index 4c17e2e32373ec..27ae7e9018f30b 100644 --- a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt +++ b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt @@ -118,6 +118,10 @@ function(ov_add_onednn) # install static libraries ov_install_static_lib(dnnl ${OV_CPACK_COMP_CORE}) + if(TARGET arm_compute) + # interface target which links with conan's arm_compute::arm_compute + ov_install_static_lib(arm_compute ${OV_CPACK_COMP_CORE}) + endif() if(DNNL_USE_ACL AND NOT BUILD_SHARED_LIBS) # use ACLConfig.cmake in OpenVINOConfig.cmake in case of static build @@ -132,9 +136,11 @@ function(ov_add_onednn) endif() endfunction() +if(OV_CPU_WITH_DNNL) + ov_add_onednn() +endif() + if(ENABLE_MLAS_FOR_CPU) add_subdirectory(mlas) ov_install_static_lib(mlas ${OV_CPACK_COMP_CORE}) endif() - -ov_add_onednn() diff --git a/src/plugins/intel_cpu/thirdparty/onednn b/src/plugins/intel_cpu/thirdparty/onednn index 31c8555b923e16..d9c8d3ab912afd 160000 --- a/src/plugins/intel_cpu/thirdparty/onednn +++ b/src/plugins/intel_cpu/thirdparty/onednn @@ -1 +1 @@ -Subproject commit 31c8555b923e16b4ddfdcd1d1f126c115b5e0da7 +Subproject commit d9c8d3ab912afd11f8c9b11ca70a5e7f4cc7d904