From ea756ae30cd4f9ad3d841c71020f284ad873bbd7 Mon Sep 17 00:00:00 2001 From: Varad Ahirwadkar Date: Wed, 2 Oct 2024 12:05:17 +0530 Subject: [PATCH 1/2] Make oneDNN dependency optional for Power Signed-off-by: Varad Ahirwadkar --- cmake/cpu_extension.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/cpu_extension.cmake b/cmake/cpu_extension.cmake index 3c474bd58d04e..500ee1fbbf4a1 100644 --- a/cmake/cpu_extension.cmake +++ b/cmake/cpu_extension.cmake @@ -84,7 +84,11 @@ endif() message(STATUS "CPU extension compile flags: ${CXX_COMPILE_FLAGS}") -list(APPEND LIBS dnnl numa) +list(APPEND LIBS numa) + +if (NOT POWER9_FOUND AND NOT POWER10_FOUND) + list(APPEND LIBS dnnl) +endif() # # _C extension From 222c4ff6e849357a09d71861ffd9184e58466404 Mon Sep 17 00:00:00 2001 From: Varad Ahirwadkar Date: Fri, 4 Oct 2024 15:08:40 +0530 Subject: [PATCH 2/2] Make oneDNN dependency optional for Power Signed-off-by: Varad Ahirwadkar --- cmake/cpu_extension.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/cpu_extension.cmake b/cmake/cpu_extension.cmake index 500ee1fbbf4a1..bc5f24d3f591c 100644 --- a/cmake/cpu_extension.cmake +++ b/cmake/cpu_extension.cmake @@ -86,7 +86,8 @@ message(STATUS "CPU extension compile flags: ${CXX_COMPILE_FLAGS}") list(APPEND LIBS numa) -if (NOT POWER9_FOUND AND NOT POWER10_FOUND) +# Appending the dnnl library for the AVX2 and AVX512, as it is not utilized by Power architecture. +if (AVX2_FOUND OR AVX512_FOUND) list(APPEND LIBS dnnl) endif()