CMakeLists.txt 1.0 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)
6
add_simple_unittest(test_SparseMatrix)
Z
zhangjinchao01 已提交
7 8 9 10 11 12 13 14 15 16

# TODO(yuyang18): Refactor TestUtil.cpp. Remove this cross module reference.
add_unittest(test_matrixCompare
    test_matrixCompare.cpp
    ../../gserver/tests/TestUtil.cpp)

add_simple_unittest(test_sparseMatrixCompare)
add_simple_unittest(test_perturbation)
add_simple_unittest(test_CpuGpuVector)
add_simple_unittest(test_Allocator)
17

H
hedaoyuan 已提交
18
if(WITH_GPU)
H
hedaoyuan 已提交
19 20 21 22
    CUDA_ADD_EXECUTABLE(test_Tensor test_Tensor.cu)
    link_paddle_test(test_Tensor)
    CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu)
    link_paddle_test(test_lazyAssign)
H
hedaoyuan 已提交
23 24 25
else()
    compile_cu_as_cpp(test_Tensor.cu)
    add_unittest(test_Tensor test_Tensor.cu)
H
hedaoyuan 已提交
26 27
    compile_cu_as_cpp(test_lazyAssign.cu)
    add_unittest(test_lazyAssign test_lazyAssign.cu)
H
hedaoyuan 已提交
28 29
endif(WITH_GPU)

30
add_simple_unittest(test_FPException)
31
add_simple_unittest(test_GpuProfiler)
32 33
add_simple_unittest(test_BaseMatrix)
add_simple_unittest(test_Matrix)