diff --git a/paddle/fluid/platform/stream/CMakeLists.txt b/paddle/fluid/platform/stream/CMakeLists.txt index e1e3e49ce9cbc04298cdb47e29e060ebffc88ba1..cf219caa9f5c9cea9b8c17f8c56acc8ee53af5df 100644 --- a/paddle/fluid/platform/stream/CMakeLists.txt +++ b/paddle/fluid/platform/stream/CMakeLists.txt @@ -1,5 +1,11 @@ +IF(WITH_MKLDNN) + set(MKLDNN_CTX_DEPS mkldnn) +ELSE() + set(MKLDNN_CTX_DEPS) +ENDIF() + IF(WITH_GPU OR WITH_ROCM) -cc_library(cuda_stream SRCS cuda_stream.cc DEPS enforce boost) +cc_library(cuda_stream SRCS cuda_stream.cc DEPS enforce boost ${MKLDNN_CTX_DEPS}) ENDIF() IF(WITH_ASCEND_CL)