From 8877bd85530c368aa7ac3b740963d590d5d59d24 Mon Sep 17 00:00:00 2001 From: Varad Ahirwadkar <86718090+varad-ahirwadkar@users.noreply.github.com> Date: Fri, 4 Oct 2024 22:54:42 +0530 Subject: [PATCH] [Hardware][PowerPC] Make oneDNN dependency optional for Power (#9039) Signed-off-by: Varad Ahirwadkar Signed-off-by: Alvant --- cmake/cpu_extension.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/cpu_extension.cmake b/cmake/cpu_extension.cmake index 3c474bd58d04e..bc5f24d3f591c 100644 --- a/cmake/cpu_extension.cmake +++ b/cmake/cpu_extension.cmake @@ -84,7 +84,12 @@ endif() message(STATUS "CPU extension compile flags: ${CXX_COMPILE_FLAGS}") -list(APPEND LIBS dnnl numa) +list(APPEND LIBS numa) + +# 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() # # _C extension