Skip to content

Commit

Permalink
openvino: rename dnnl to onednn_cpu to avoid conflicts in packages (#…
Browse files Browse the repository at this point in the history
…33110)

* openvino: rename dnnl to onednn_cpu to avoid conflicts in packages

* updated versions files
  • Loading branch information
ilya-lavrenov committed Aug 15, 2023
1 parent bdda9da commit dd54d5e
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 2 deletions.
57 changes: 57 additions & 0 deletions ports/openvino/007-dnnl-library-rename.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
diff --git a/src/plugins/intel_cpu/CMakeLists.txt b/src/plugins/intel_cpu/CMakeLists.txt
index d1150fdab0..cb2881301f 100644
--- a/src/plugins/intel_cpu/CMakeLists.txt
+++ b/src/plugins/intel_cpu/CMakeLists.txt
@@ -85,11 +85,11 @@ endif()

ie_mark_target_as_cc(${TARGET_NAME})

-target_link_libraries(${TARGET_NAME} PRIVATE dnnl
+target_link_libraries(${TARGET_NAME} PRIVATE ${DNNL_LIBRARY_NAME}
ov_shape_inference
inference_engine_snippets)

-target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $<TARGET_PROPERTY:dnnl,INCLUDE_DIRECTORIES>)
+target_include_directories(${TARGET_NAME} SYSTEM PRIVATE $<TARGET_PROPERTY:${DNNL_LIBRARY_NAME},INCLUDE_DIRECTORIES>)
target_compile_definitions(${TARGET_NAME} PRIVATE IMPLEMENT_INFERENCE_EXTENSION_API)
target_include_directories(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)

@@ -119,7 +119,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_REL

if(BUILD_SHARED_LIBS)
add_library(${TARGET_NAME}_obj OBJECT ${SOURCES} ${HEADERS})
- link_system_libraries(${TARGET_NAME}_obj PUBLIC dnnl openvino::pugixml)
+ link_system_libraries(${TARGET_NAME}_obj PUBLIC ${DNNL_LIBRARY_NAME} openvino::pugixml)

ov_add_version_defines(src/plugin.cpp ${TARGET_NAME}_obj)

@@ -133,7 +133,7 @@ if(BUILD_SHARED_LIBS)
${CMAKE_CURRENT_SOURCE_DIR}/src
$<TARGET_PROPERTY:openvino::conditional_compilation,INTERFACE_INCLUDE_DIRECTORIES>)

- target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $<TARGET_PROPERTY:dnnl,INCLUDE_DIRECTORIES>)
+ target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $<TARGET_PROPERTY:${DNNL_LIBRARY_NAME},INCLUDE_DIRECTORIES>)

set_ie_threading_interface_for(${TARGET_NAME}_obj)

diff --git a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt
index 19e453d6b4..f25b7d3db7 100644
--- a/src/plugins/intel_cpu/thirdparty/CMakeLists.txt
+++ b/src/plugins/intel_cpu/thirdparty/CMakeLists.txt
@@ -36,6 +36,7 @@ function(ov_add_onednn)
# select needed primitives
set(DNNL_ENABLE_PRIMITIVE "CONVOLUTION;DECONVOLUTION;CONCAT;LRN;INNER_PRODUCT;MATMUL;POOLING;REDUCTION;REORDER;RNN;SOFTMAX" CACHE STRING "" FORCE)
set(DNNL_ENABLE_WORKLOAD "INFERENCE" CACHE STRING "" FORCE)
+ set(DNNL_LIBRARY_NAME "onednn_cpu" CACHE STRING "" FORCE)

# Allow to enable oneDNN verbose with CPU_DEBUG_CAPS and rely on oneDNN default configuration otherwise
if(ENABLE_CPU_DEBUG_CAPS)
@@ -116,7 +117,7 @@ function(ov_add_onednn)
add_subdirectory(onednn EXCLUDE_FROM_ALL)

# install static libraries
- ov_install_static_lib(dnnl cpu)
+ ov_install_static_lib(${DNNL_LIBRARY_NAME} cpu)

if(DNNL_USE_ACL AND NOT BUILD_SHARED_LIBS)
# use ACLConfig.cmake in OpenVINOConfig.cmake in case of static build
1 change: 1 addition & 0 deletions ports/openvino/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_from_github(
003-fix-find-onnx.patch
004-onednn-build.patch
005-rename-utils.patch
007-dnnl-library-rename.patch
HEAD_REF master)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
Expand Down
2 changes: 1 addition & 1 deletion ports/openvino/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "openvino",
"version-date": "2023-06-11",
"port-version": 5,
"port-version": 6,
"maintainers": "OpenVINO Developers <openvino@intel.com>",
"summary": "This is a port for Open Visual Inference And Optimization toolkit for AI inference",
"description": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6126,7 +6126,7 @@
},
"openvino": {
"baseline": "2023-06-11",
"port-version": 5
"port-version": 6
},
"openvpn3": {
"baseline": "3.7.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openvino.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ad00a0dadb3ecf1eff66f9de71017808ade00d0f",
"version-date": "2023-06-11",
"port-version": 6
},
{
"git-tree": "7737d9d905aa9a31e47e32abf5ef420bd1446def",
"version-date": "2023-06-11",
Expand Down

0 comments on commit dd54d5e

Please sign in to comment.