CMakeLists.txt 2.7 KB
Newer Older
1
add_subdirectory(benchmark)
2 3 4
if(WITH_CINN)
  add_subdirectory(cinn)
endif()
5 6 7
# add_subdirectory(controlflow)
# add_subdirectory(detection)
# add_subdirectory(dlnne)
8
add_subdirectory(elementwise)
9
add_subdirectory(fused)
10 11 12
if(WITH_LITE)
  add_subdirectory(lite)
endif()
13
add_subdirectory(math)
14 15 16
if(WITH_MKLDNN)
  add_subdirectory(mkldnn)
endif()
17
add_subdirectory(nccl)
18 19 20
if(WITH_PSCORE)
  add_subdirectory(pscore)
endif()
21 22 23
add_subdirectory(prim_ops)
add_subdirectory(reader)
add_subdirectory(reduce_ops)
24
# add_subdirectory(tensorrt)
G
gouzil 已提交
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109

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
       elementwise_add_op softmax_op softmax)
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
  DEPS tensor math_function)
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
    DEPS dropout_op tensor generator)
  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
    DEPS elementwise_add_op matmul_op tensor generator)
elseif(WITH_ROCM)
  hip_test(
    dropout_op_test
    SRCS dropout_op_test.cc
    DEPS dropout_op tensor generator)
  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)

cc_test_old(op_debug_string_test SRCS op_debug_string_test.cc DEPS
            elementwise_add_op ${COMMON_OP_DEPS})

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()