CMakeLists.txt 913 字节
Newer Older
W
Wu Yi 已提交
1
include(operators)
2
if(WITH_UNITY_BUILD)
3 4
  # Load Unity Build rules for operators in paddle/fluid/operators/reduce_ops.
  include(unity_build_rule.cmake)
5
endif()
P
peizhilin 已提交
6
if(WITH_GPU)
7 8 9
  if(${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0)
    register_operators(DEPS cub)
  else()
P
peizhilin 已提交
10
    register_operators()
11 12 13
  endif()
else()
  register_operators()
P
peizhilin 已提交
14
endif()
W
Wu Yi 已提交
15

16
if(WITH_GPU)
17 18 19 20 21 22 23 24 25 26 27
  if(${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0)
    nv_test(
      check_reduce_rank_test
      SRCS check_reduce_rank_test.cu
      DEPS tensor cub)
  else()
    nv_test(
      check_reduce_rank_test
      SRCS check_reduce_rank_test.cu
      DEPS tensor)
  endif()
28
endif()
29 30

if(WITH_ROCM)
31 32 33 34
  hip_test(
    check_reduce_rank_test
    SRCS check_reduce_rank_test.cu
    DEPS tensor)
35
endif()
36 37

if(WITH_ASCEND_CL)
38 39 40 41
  cc_test(
    reduce_any_op_npu_test
    SRCS reduce_any_op_npu_test.cc
    DEPS op_registry reduce_any_op scope device_context enforce executor)
42
endif()