From c963a21d4f790fe638288b35328ad2feaee82927 Mon Sep 17 00:00:00 2001 From: chentianyu03 Date: Tue, 20 Jul 2021 15:58:45 +0800 Subject: [PATCH] fix cuda_stream missing mkldnn depending error (#34260) --- paddle/fluid/platform/stream/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/platform/stream/CMakeLists.txt b/paddle/fluid/platform/stream/CMakeLists.txt index e1e3e49ce9..cf219caa9f 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) -- GitLab