CMakeLists.txt 2.9 KB
Newer Older
W
wopeizl 已提交
1
add_subdirectory(detail)
2

P
pangyoki 已提交
3 4 5 6
if (WITH_ASCEND_CL)
  cc_library(beam_search_npu SRCS beam_search_npu.cc DEPS npu_op_runner)
endif()

7
# please add new math_library in alphabetical order
8
if (WITH_ASCEND_CL)
L
Leo Chen 已提交
9
math_library(concat_and_split DEPS concat_and_split_functor npu_op_runner)
10
else()
L
Leo Chen 已提交
11
math_library(concat_and_split DEPS concat_and_split_functor)
12
endif()
13
math_library(context_project DEPS im2col math_function)
14
math_library(cross_entropy)
15
math_library(cos_sim_functor)
Z
Zeng Jinle 已提交
16
math_library(depthwise_conv)
17
math_library(im2col)
X
xuezhong 已提交
18
math_library(sample_prob)
19
math_library(sampler DEPS generator)
D
dzhwinter 已提交
20

W
wopeizl 已提交
21 22
math_library(gru_compute DEPS activation_functions math_function)
math_library(lstm_compute DEPS activation_functions)
23
math_library(maxouting)
24
math_library(pooling)
L
lidanqing 已提交
25 26

if(WITH_MKLDNN)
27
    math_library(selected_rows_functor DEPS selected_rows_utils math_function blas mkldnn_axpy_handler)
L
lidanqing 已提交
28
else()
29
    math_library(selected_rows_functor DEPS selected_rows_utils math_function blas)
L
lidanqing 已提交
30 31
endif()

32 33
math_library(sequence2batch)
math_library(sequence_padding)
T
tensor-tang 已提交
34
math_library(sequence_pooling DEPS math_function jit_kernel_helper)
35
math_library(sequence_scale)
T
tensor-tang 已提交
36
math_library(softmax DEPS math_function jit_kernel_helper)
P
pangyoki 已提交
37 38 39 40 41
if (WITH_ASCEND_CL)
    math_library(beam_search DEPS math_function beam_search_npu)
else()
    math_library(beam_search DEPS math_function)
endif()
42
math_library(fc DEPS blas jit_kernel_helper)
W
wopeizl 已提交
43 44
math_library(matrix_bit_code)

Z
zhangchunle 已提交
45

46
math_library(unpooling)
47
math_library(vol2col)
N
nhzlx 已提交
48
math_library(prelu)
49
math_library(bert_encoder_functor)
Z
zhaozhehao 已提交
50
math_library(tree2col DEPS math_function)
51
math_library(matrix_inverse)
52
math_library(segment_pooling)
W
Weilong Wu 已提交
53
math_library(matrix_solve)
Q
qijun 已提交
54

55
cc_test(selected_rows_functor_test SRCS selected_rows_functor_test.cc DEPS selected_rows_functor)
56 57
cc_test(im2col_test SRCS im2col_test.cc DEPS im2col)
cc_test(vol2col_test SRCS vol2col_test.cc DEPS vol2col)
Y
Yiqun Liu 已提交
58
cc_test(sequence_padding_test SRCS sequence_padding_test.cc DEPS sequence_padding)
59
cc_test(sequence_pooling_test SRCS sequence_pooling_test.cc DEPS sequence_pooling)
60
cc_test(beam_search_test SRCS beam_search_test.cc DEPS beam_search)
61
if(WITH_GPU)
Y
Yu Yang 已提交
62
    nv_test(selected_rows_functor_gpu_test SRCS selected_rows_functor_test.cu.cc DEPS selected_rows_functor math_function)
63
endif()
64 65 66
if(WITH_ROCM)
    hip_test(selected_rows_functor_gpu_test SRCS selected_rows_functor_test.cu.cc DEPS selected_rows_functor math_function)
endif()
C
chengduo 已提交
67
cc_test(concat_test SRCS concat_test.cc DEPS concat_and_split)
Z
zhangkaihuo 已提交
68 69 70 71 72 73 74 75 76

if(WITH_GPU AND (NOT WITH_ROCM))
#currenty not yet support ROCM 
#the generic conversion APIs of dense and sparse are only supported after cuda11.2
    if((NOT ${CMAKE_CUDA_COMPILER_VERSION} VERSION_LESS 11.2)) 
        cc_test(cusparse_conversion_api_test SRCS cusparse_conversion_api_test.cc DEPS tensor)
    endif()
endif()

T
tensor-tang 已提交
77
cc_test(cpu_vec_test SRCS cpu_vec_test.cc DEPS blas cpu_info)
78 79
if(WITH_TESTING AND TEST im2col_test)
    set_tests_properties(im2col_test PROPERTIES TIMEOUT 120)
Y
YUNSHEN XIE 已提交
80
endif()