From f79293387b330f615503bdd2cc009fc9fd88bb86 Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Fri, 24 Apr 2020 09:56:30 +0800 Subject: [PATCH] fix compilation failure (#24090) --- paddle/fluid/operators/math/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/operators/math/CMakeLists.txt b/paddle/fluid/operators/math/CMakeLists.txt index e174c8992c2..77a8aa5d9c7 100644 --- a/paddle/fluid/operators/math/CMakeLists.txt +++ b/paddle/fluid/operators/math/CMakeLists.txt @@ -8,6 +8,9 @@ function(math_library TARGET) set(cu_srcs) set(hip_srcs) set(math_common_deps device_context framework_proto enforce) + if (WITH_GPU) + list(APPEND math_common_deps cub) + endif() set(multiValueArgs DEPS) cmake_parse_arguments(math_library "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -37,7 +40,7 @@ math_library(concat_and_split) math_library(context_project DEPS im2col math_function) math_library(cross_entropy) math_library(cos_sim_functor) -math_library(depthwise_conv DEPS cub) +math_library(depthwise_conv) math_library(im2col) math_library(sample_prob) math_library(sampler) -- GitLab