From 4b52286e6d3f2127fd6237453e3924101adfb2f8 Mon Sep 17 00:00:00 2001 From: Seyed Morteza Hosseini Date: Wed, 30 Oct 2024 01:49:08 -0700 Subject: [PATCH] Add kleidiai as thirdparty --- .gitmodules | 3 +++ src/plugins/intel_cpu/CMakeLists.txt | 7 +++++++ src/plugins/intel_cpu/thirdparty/CMakeLists.txt | 6 ++++++ src/plugins/intel_cpu/thirdparty/kleidiai | 1 + 4 files changed, 17 insertions(+) create mode 160000 src/plugins/intel_cpu/thirdparty/kleidiai diff --git a/.gitmodules b/.gitmodules index 5feb7458da1801..ac0e785cc4c409 100644 --- a/.gitmodules +++ b/.gitmodules @@ -90,3 +90,6 @@ [submodule "src/plugins/intel_cpu/thirdparty/shl"] path = src/plugins/intel_cpu/thirdparty/shl url = https://github.com/openvinotoolkit/shl.git +[submodule "src/plugins/intel_cpu/thirdparty/kleidiai"] + path = src/plugins/intel_cpu/thirdparty/kleidiai + url = https://git.gitlab.arm.com/kleidi/kleidiai.git diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt index 04909c7d8f5a5a..a4a504c4d2690c 100644 --- a/src/plugins/intel_cpu/CMakeLists.txt +++ b/src/plugins/intel_cpu/CMakeLists.txt @@ -271,6 +271,9 @@ endif () if(ENABLE_SHL_FOR_CPU) target_link_libraries(${TARGET_NAME} PRIVATE shl) endif() +if(ENABLE_KLEIDIAI_FOR_CPU) + target_link_libraries(${TARGET_NAME} PRIVATE kleidiai) +endif() target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $) # Temporal solution to use template reference implementations in cases where optimizied implementation @@ -374,6 +377,10 @@ if(BUILD_SHARED_LIBS) target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $) endif() + if(ENABLE_KLEIDIAI_FOR_CPU) + target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $) + endif() + ov_set_threading_interface_for(${TARGET_NAME}_obj) target_compile_definitions(${TARGET_NAME}_obj PRIVATE USE_STATIC_IE) diff --git a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt index 8ba38985d5935e..605470b7d4aeb8 100644 --- a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt +++ b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt @@ -169,4 +169,10 @@ if(ENABLE_SHL_FOR_CPU) ov_install_static_lib(shl ${OV_CPACK_COMP_CORE}) endif() +if(ENABLE_KLEIDIAI_FOR_CPU) + set(KLEIDIAI_BUILD_TESTS OFF CACHE BOOL "" FORCE) + add_subdirectory(kleidiai) + ov_install_static_lib(kleidiai ${OV_CPACK_COMP_CORE}) +endif() + ov_add_onednn() diff --git a/src/plugins/intel_cpu/thirdparty/kleidiai b/src/plugins/intel_cpu/thirdparty/kleidiai new file mode 160000 index 00000000000000..4e83e60dfc2c77 --- /dev/null +++ b/src/plugins/intel_cpu/thirdparty/kleidiai @@ -0,0 +1 @@ +Subproject commit 4e83e60dfc2c77bc9a3dcd76fd4a67357dd6ed4a