CMakeLists.txt 1.6 KB
Newer Older
H
hedaoyuan 已提交
1 2
file(GLOB h_files . *Op.h)
file(GLOB cpp_files . *Op.cpp)
3 4 5

list(APPEND h_files Function.h)
list(APPEND cpp_files Function.cpp)
6
list(APPEND cpp_files BufferArg.cpp)
H
hedaoyuan 已提交
7
list(APPEND cpp_files GemmFunctor.cpp)
H
hedaoyuan 已提交
8 9 10
if(USE_EIGEN_FOR_BLAS)
  list(APPEND cpp_files EigenGemm.cpp)
endif(USE_EIGEN_FOR_BLAS)
11 12

if(WITH_GPU)
H
hedaoyuan 已提交
13
    file(GLOB cu_files . *OpGpu.cu)
14
    cuda_compile(cu_objs ${cu_files})
H
hedaoyuan 已提交
15 16
endif()

17 18
if(USE_NNPACK)
  list(APPEND cpp_files nnpack/NNPACKConvOp.cpp)
H
hedaoyuan 已提交
19 20 21
  if(WITH_TESTING)
    add_unittest(NNPACKConvOpTest nnpack/NNPACKConvOpTest.cpp)
  endif()
22 23
endif()

H
hedaoyuan 已提交
24 25
list(APPEND cpp_files neon/NeonDepthwiseConv.cpp)

26
add_library(paddle_function STATIC ${cpp_files} ${cu_objs})
27
add_dependencies(paddle_function ${external_project_dependencies})
Y
Yu Yang 已提交
28
add_dependencies(paddle_function paddle_proto)
29

H
hedaoyuan 已提交
30
if(WITH_TESTING)
31
if(WITH_GPU)
32
    # TODO:
H
hedaoyuan 已提交
33
    # file(GLOB test_files . *OpTest.cpp)
34
    # add_executable(${test_bin} EXCLUDE_FROM_ALL ${test_files})
H
hedaoyuan 已提交
35
    add_simple_unittest(CrossMapNormalOpTest)
36 37 38
    add_simple_unittest(TensorShapeTest)
    add_simple_unittest(TensorTypeTest)
    add_simple_unittest(BufferArgTest)
H
hedaoyuan 已提交
39
    add_simple_unittest(FunctionTest)
40
    add_simple_unittest(ContextProjectionOpTest)
D
dangqingqing 已提交
41
    add_simple_unittest(PadOpTest)
42
    add_simple_unittest(MulOpTest)
43
    add_simple_unittest(CosSimOpTest)
D
dangqingqing 已提交
44
    add_simple_unittest(RowConvOpTest)
H
hedaoyuan 已提交
45
    add_simple_unittest(BlockExpandOpTest)
W
wanghaoshuang 已提交
46
    add_simple_unittest(CropOpTest)
W
wanghaoshuang 已提交
47
    add_simple_unittest(SwitchOpTest)
Y
yangyaming 已提交
48
    add_simple_unittest(ScaleSubRegionOpTest)
49
endif()
50

H
hedaoyuan 已提交
51
add_simple_unittest(Im2ColTest)
52
add_simple_unittest(GemmConvOpTest)
H
hedaoyuan 已提交
53
add_simple_unittest(DepthwiseConvOpTest)
H
hedaoyuan 已提交
54
endif()