File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,15 @@ ADD_LIBRARY(mkldnn STATIC ${dummyfile})
78
78
TARGET_LINK_LIBRARIES (mkldnn ${MKLDNN_LIB} ${MKLML_LIB} ${MKLML_IOMP_LIB} )
79
79
ADD_DEPENDENCIES (mkldnn ${MKLDNN_PROJECT} )
80
80
81
+ # copy the real so.0 lib to install dir
82
+ # it can be directly contained in wheel or capi
83
+ SET (MKLDNN_SHARED_LIB ${MKLDNN_INSTALL_DIR} /libmkldnn.so.0 )
84
+ ADD_CUSTOM_COMMAND (OUTPUT ${MKLDNN_SHARED_LIB}
85
+ COMMAND cp ${MKLDNN_LIB} ${MKLDNN_SHARED_LIB}
86
+ DEPENDS mkldnn )
87
+ ADD_CUSTOM_TARGET (mkldnn_shared_lib ALL DEPENDS ${MKLDNN_SHARED_LIB} )
88
+
81
89
IF (WITH_C_API )
82
- INSTALL (FILES ${MKLDNN_LIB } DESTINATION lib )
90
+ INSTALL (FILES ${MKLDNN_SHARED_LIB } DESTINATION lib )
83
91
ENDIF ()
84
92
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ if(WITH_MKLML)
29
29
endif ()
30
30
31
31
if (WITH_MKLDNN )
32
- list (APPEND MKL_SHARED_LIBS "${MKLDNN_LIB} " " ${MKLDNN_LIB} .0 " )
33
- list (APPEND MKL_DEPENDS mkldnn )
32
+ list (APPEND MKL_SHARED_LIBS "${MKLDNN_SHARED_LIB} " )
33
+ list (APPEND MKL_DEPENDS mkldnn mkldnn_shared_lib )
34
34
endif ()
35
35
36
36
if (WITH_GPU )
You can’t perform that action at this time.
0 commit comments