CMakeLists.txt 2.6 KB
Newer Older
1 2 3 4 5
if(WITH_ASCEND_CL)
  cc_library(
    beam_search_npu
    SRCS beam_search_npu.cc
    DEPS npu_op_runner)
P
pangyoki 已提交
6 7
endif()

8 9 10 11 12 13 14
if(WITH_XPU)
  cc_library(
    beam_search_xpu
    SRCS beam_search_xpu.cc
    DEPS xpu_op_list)
endif()

15
# please add new math_library in alphabetical order
16 17 18 19
if(WITH_ASCEND_CL)
  math_library(concat_and_split DEPS concat_and_split_functor npu_op_runner)
elseif(WITH_MLU)
  math_library(concat_and_split DEPS concat_and_split_functor mlu_baseop)
20
else()
21
  math_library(concat_and_split DEPS concat_and_split_functor)
22
endif()
23
math_library(context_project DEPS im2col math_function)
24
math_library(cross_entropy)
25
math_library(cos_sim_functor)
Z
Zeng Jinle 已提交
26
math_library(depthwise_conv)
27
math_library(im2col)
X
xuezhong 已提交
28
math_library(sample_prob)
29
math_library(sampler DEPS generator)
D
dzhwinter 已提交
30

F
Feiyu Chan 已提交
31
# math_library(math_function DEPS blas dense_tensor tensor)
32
math_library(maxouting)
L
lidanqing 已提交
33 34

if(WITH_MKLDNN)
35 36 37 38 39 40 41 42
  math_library(
    selected_rows_functor
    DEPS
    selected_rows_utils
    math_function
    blas
    mkldnn_axpy_handler
    mixed_vector)
L
lidanqing 已提交
43
else()
44 45
  math_library(selected_rows_functor DEPS selected_rows_utils math_function
               blas mixed_vector)
L
lidanqing 已提交
46 47
endif()

48
math_library(sequence_padding)
T
tensor-tang 已提交
49
math_library(sequence_pooling DEPS math_function jit_kernel_helper)
50
math_library(sequence_scale)
T
tensor-tang 已提交
51
math_library(softmax DEPS math_function jit_kernel_helper)
52 53
if(WITH_ASCEND_CL)
  math_library(beam_search DEPS math_function beam_search_npu)
54 55
elseif(WITH_XPU)
  math_library(beam_search DEPS math_function beam_search_xpu)
P
pangyoki 已提交
56
else()
57
  math_library(beam_search DEPS math_function)
P
pangyoki 已提交
58
endif()
W
wopeizl 已提交
59 60
math_library(matrix_bit_code)

61
math_library(unpooling)
62
math_library(vol2col)
N
nhzlx 已提交
63
math_library(prelu)
64
math_library(bert_encoder_functor)
Z
zhaozhehao 已提交
65
math_library(tree2col DEPS math_function)
Q
qijun 已提交
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
cc_test(
  selected_rows_functor_test
  SRCS selected_rows_functor_test.cc
  DEPS selected_rows_functor)
cc_test(
  im2col_test
  SRCS im2col_test.cc
  DEPS im2col)
cc_test(
  vol2col_test
  SRCS vol2col_test.cc
  DEPS vol2col)
cc_test(
  sequence_padding_test
  SRCS sequence_padding_test.cc
  DEPS sequence_padding)
cc_test(
  sequence_pooling_test
  SRCS sequence_pooling_test.cc
  DEPS sequence_pooling)
cc_test(
  beam_search_test
  SRCS beam_search_test.cc
  DEPS beam_search)
91
if(WITH_GPU)
92 93 94 95
  nv_test(
    selected_rows_functor_gpu_test
    SRCS selected_rows_functor_test.cu.cc
    DEPS selected_rows_functor math_function)
96
endif()
97
if(WITH_ROCM)
98 99 100 101
  hip_test(
    selected_rows_functor_gpu_test
    SRCS selected_rows_functor_test.cu.cc
    DEPS selected_rows_functor math_function)
102
endif()
103 104 105 106
cc_test(
  concat_test
  SRCS concat_test.cc
  DEPS concat_and_split)
Z
zhangkaihuo 已提交
107

108
if(WITH_TESTING AND TEST im2col_test)
109
  set_tests_properties(im2col_test PROPERTIES TIMEOUT 120)
Y
YUNSHEN XIE 已提交
110
endif()