提交 6de20496 编写于 作者: T tensor-tang

use the mkldnn shared lib so.0

上级 11ed2f2f
...@@ -78,7 +78,15 @@ ADD_LIBRARY(mkldnn STATIC ${dummyfile}) ...@@ -78,7 +78,15 @@ ADD_LIBRARY(mkldnn STATIC ${dummyfile})
TARGET_LINK_LIBRARIES(mkldnn ${MKLDNN_LIB} ${MKLML_LIB} ${MKLML_IOMP_LIB}) TARGET_LINK_LIBRARIES(mkldnn ${MKLDNN_LIB} ${MKLML_LIB} ${MKLML_IOMP_LIB})
ADD_DEPENDENCIES(mkldnn ${MKLDNN_PROJECT}) ADD_DEPENDENCIES(mkldnn ${MKLDNN_PROJECT})
# copy the real so.0 lib to install dir
# it can be directly contained in wheel or capi
SET(MKLDNN_SHARED_LIB ${MKLDNN_INSTALL_DIR}/libmkldnn.so.0)
ADD_CUSTOM_COMMAND(OUTPUT ${MKLDNN_SHARED_LIB}
COMMAND cp ${MKLDNN_LIB} ${MKLDNN_SHARED_LIB}
DEPENDS mkldnn)
ADD_CUSTOM_TARGET(mkldnn_shared_lib ALL DEPENDS ${MKLDNN_SHARED_LIB})
IF(WITH_C_API) IF(WITH_C_API)
INSTALL(FILES ${MKLDNN_LIB} DESTINATION lib) INSTALL(FILES ${MKLDNN_SHARED_LIB} DESTINATION lib)
ENDIF() ENDIF()
...@@ -29,8 +29,8 @@ if(WITH_MKLML) ...@@ -29,8 +29,8 @@ if(WITH_MKLML)
endif() endif()
if(WITH_MKLDNN) if(WITH_MKLDNN)
list(APPEND MKL_SHARED_LIBS "${MKLDNN_LIB}" "${MKLDNN_LIB}.0") list(APPEND MKL_SHARED_LIBS "${MKLDNN_SHARED_LIB}")
list(APPEND MKL_DEPENDS mkldnn) list(APPEND MKL_DEPENDS mkldnn mkldnn_shared_lib)
endif() endif()
if(WITH_GPU) if(WITH_GPU)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册