CMakeLists.txt 1.2 KB
Newer Older
1 2 3 4 5
# Adapt to custom op mechanism: Include the header files related to the data type
# to avoid exposing the path of the underlying file, remove it after moving
# float16.h/complex.h/bfloat16.h into pten
include_directories(${PADDLE_SOURCE_DIR}/paddle/fluid/platform)

6 7 8
# paddle experimental common components
add_subdirectory(common)

9 10
# pten (low level) api headers: include
# pten (high level) api
11 12 13
add_subdirectory(api)
# pten core components
add_subdirectory(core)
C
Chen Weihang 已提交
14 15
# pten components of specific backends
add_subdirectory(backends)
16 17
# pten kernels for diff device
add_subdirectory(kernels)
C
Chen Weihang 已提交
18 19
# pten infermeta
add_subdirectory(infermeta)
C
Chen Weihang 已提交
20 21
# pten operator definitions
add_subdirectory(ops)
22 23
# pten tests
add_subdirectory(tests)
24 25

# make an unity target for compile deps
26
set(PTEN_DEPS convert_utils dense_tensor pten_context kernel_factory kernel_context)
27
set(PTEN_DEPS ${PTEN_DEPS} math_cpu linalg_cpu manipulation_cpu conj_kernel_cpu scale_kernel_cpu full_kernel_cpu flatten)
28
set(PTEN_DEPS ${PTEN_DEPS} nary unary binary)
29
if(WITH_GPU OR WITH_ROCM)
30
  set(PTEN_DEPS ${PTEN_DEPS} math_gpu linalg_gpu manipulation_gpu conj_kernel_gpu scale_kernel_gpu full_kernel_gpu)
31
endif()
32 33 34
if(WITH_XPU)
  set(PTEN_DEPS ${PTEN_DEPS} manipulation_xpu)
endif()
35

36
cc_library(pten SRCS all.cc DEPS ${PTEN_DEPS})