CMakeLists.txt 2.8 KB
Newer Older
1
add_subdirectory(benchmark)
2 3 4
if(WITH_CINN)
  add_subdirectory(cinn)
endif()
5 6 7 8 9
add_subdirectory(controlflow)
add_subdirectory(detection)
if(WITH_DLNNE)
  add_subdirectory(dlnne)
endif()
10
add_subdirectory(elementwise)
11
add_subdirectory(fused)
12 13 14
if(WITH_LITE)
  add_subdirectory(lite)
endif()
15
add_subdirectory(math)
16 17 18
if(WITH_MKLDNN)
  add_subdirectory(mkldnn)
endif()
19
add_subdirectory(nccl)
20 21 22
if(WITH_PSCORE)
  add_subdirectory(pscore)
endif()
23 24 25
add_subdirectory(prim_ops)
add_subdirectory(reader)
add_subdirectory(reduce_ops)
26 27 28 29
# TODO(gouzil): enable this after the bug is fixed. windows: Exit code 0xc000007b, pr: #53470
# if(WITH_GPU AND TENSORRT_FOUND)
#   add_subdirectory(tensorrt)
# endif()
G
gouzil 已提交
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

set(COMMON_OP_DEPS ${COMMON_OP_DEPS} executor)

if(WITH_XPU)
  cc_test(
    beam_search_decode_op_xpu_test
    SRCS beam_search_decode_op_xpu_test.cc
    DEPS lod_tensor)
  set(COMMON_OP_DEPS ${COMMON_OP_DEPS} xpulib)
endif()

cc_test(
  test_common_infer_shape_functions
  SRCS test_common_infer_shape_functions.cc
  DEPS common_infer_shape_functions ${COMMON_OP_DEPS} activation_op
45
       elementwise_add_op phi generated_static_op)
G
gouzil 已提交
46 47 48 49 50 51 52 53 54 55 56
cc_test(
  gather_test
  SRCS gather_test.cc
  DEPS tensor)
cc_test(
  assign_op_test
  SRCS assign_op_test.cc
  DEPS generated_static_op)
cc_test(
  scatter_test
  SRCS scatter_test.cc
57
  DEPS tensor phi)
G
gouzil 已提交
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
cc_test(
  beam_search_decode_op_test
  SRCS beam_search_decode_op_test.cc
  DEPS lod_tensor)
cc_test(
  save_load_op_test
  SRCS save_load_op_test.cc
  DEPS save_op load_op)
cc_test(
  save_load_combine_op_test
  SRCS save_load_combine_op_test.cc
  DEPS save_combine_op load_combine_op)

if(WITH_GPU)
  nv_test(
    dropout_op_test
    SRCS dropout_op_test.cc
75
    DEPS dropout_op tensor phi)
G
gouzil 已提交
76 77 78 79 80 81 82 83
  nv_test(
    test_leaky_relu_grad_grad_functor
    SRCS test_leaky_relu_grad_grad_functor.cc
         test_leaky_relu_grad_grad_functor.cu
    DEPS tensor device_context eigen3)
  nv_test(
    feed_forward_test
    SRCS feed_forward_test.cu
84
    DEPS elementwise_add_op matmul_op tensor phi)
G
gouzil 已提交
85 86 87 88
elseif(WITH_ROCM)
  hip_test(
    dropout_op_test
    SRCS dropout_op_test.cc
89
    DEPS dropout_op tensor phi)
G
gouzil 已提交
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
  hip_test(
    test_leaky_relu_grad_grad_functor
    SRCS test_leaky_relu_grad_grad_functor.cc
         test_leaky_relu_grad_grad_functor.cu
    DEPS tensor device_context eigen3)
else()
  cc_test(
    test_leaky_relu_grad_grad_functor
    SRCS test_leaky_relu_grad_grad_functor.cc
    DEPS tensor device_context eigen3)
endif()
cc_test(
  share_buffer_op_cpp_test
  SRCS share_buffer_op_test.cc
  DEPS lod_tensor device_context generated_static_op)

R
risemeup1 已提交
106 107 108 109 110 111 112 113 114 115
cc_test_old(
  op_debug_string_test
  SRCS
  op_debug_string_test.cc
  DEPS
  executor
  recurrent_op_helper
  recurrent_op
  elementwise_add_op
  ${COMMON_OP_DEPS})
G
gouzil 已提交
116 117 118 119 120 121 122

if(WITH_GPU)
  cc_test(
    copy_cross_scope_test
    SRCS copy_cross_scope_test.cc
    DEPS op_registry copy_cross_scope_op scope device_context enforce executor)
endif()