CMakeLists.txt 1.2 KB
Newer Older
Z
zhangjinchao01 已提交
1 2 3 4
# unittest for common package

add_simple_unittest(test_ExecViaCpu)
add_simple_unittest(test_SIMDFunctions)
H
hedaoyuan 已提交
5
add_simple_unittest(test_TrainingAlgorithm)
Y
Yu Yang 已提交
6
add_simple_unittest(test_RowBuffer)
H
hedaoyuan 已提交
7 8 9
if(NOT MOBILE_INFERENCE)
    add_simple_unittest(test_SparseMatrix)
endif()
Z
zhangjinchao01 已提交
10 11 12

# TODO(yuyang18): Refactor TestUtil.cpp. Remove this cross module reference.
add_unittest(test_matrixCompare
13
    test_matrixCompare.cpp)
Z
zhangjinchao01 已提交
14 15 16 17 18

add_simple_unittest(test_sparseMatrixCompare)
add_simple_unittest(test_perturbation)
add_simple_unittest(test_CpuGpuVector)
add_simple_unittest(test_Allocator)
19

H
hedaoyuan 已提交
20
if(WITH_GPU)
H
hedaoyuan 已提交
21 22 23
    CUDA_ADD_EXECUTABLE(test_Tensor test_Tensor.cu)
    link_paddle_test(test_Tensor)
    CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu)
K
Kexin Zhao 已提交
24 25
    link_paddle_test(test_lazyAssign)
    nv_test(test_float16_gpu SRCS test_float16.cu)
H
hedaoyuan 已提交
26 27 28
else()
    compile_cu_as_cpp(test_Tensor.cu)
    add_unittest(test_Tensor test_Tensor.cu)
H
hedaoyuan 已提交
29 30
    compile_cu_as_cpp(test_lazyAssign.cu)
    add_unittest(test_lazyAssign test_lazyAssign.cu)
H
hedaoyuan 已提交
31 32
endif(WITH_GPU)

33
add_simple_unittest(test_FPException)
34
add_simple_unittest(test_GpuProfiler)
35 36
add_simple_unittest(test_BaseMatrix)
add_simple_unittest(test_Matrix)
K
Kexin Zhao 已提交
37
cc_test(test_float16 SRCS test_float16.cpp)