CMakeLists.txt 1.1 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 19
if(WITH_GPU)
    if(COMPILER_SUPPORT_CXX11)
H
hedaoyuan 已提交
20 21
    	CUDA_ADD_EXECUTABLE(test_Tensor test_Tensor.cu)
		link_paddle_test(test_Tensor)
H
hedaoyuan 已提交
22 23
        CUDA_ADD_EXECUTABLE(test_lazyAssign test_lazyAssign.cu)
        link_paddle_test(test_lazyAssign)
H
hedaoyuan 已提交
24 25 26 27
    endif()
else()
    compile_cu_as_cpp(test_Tensor.cu)
    add_unittest(test_Tensor test_Tensor.cu)
H
hedaoyuan 已提交
28 29
    compile_cu_as_cpp(test_lazyAssign.cu)
    add_unittest(test_lazyAssign test_lazyAssign.cu)
H
hedaoyuan 已提交
30 31
endif(WITH_GPU)

32
add_simple_unittest(test_FPException)
33
add_simple_unittest(test_GpuProfiler)
34 35
add_simple_unittest(test_BaseMatrix)
add_simple_unittest(test_Matrix)