From ab2e2842353749df69380320476bbb306f8dc9fa Mon Sep 17 00:00:00 2001 From: Zeng Jinle <32832641+sneaxiy@users.noreply.github.com> Date: Fri, 24 Apr 2020 09:59:24 +0800 Subject: [PATCH] fix compilation failure (#24091) --- 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 e174c8992c..77a8aa5d9c 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