CMakeLists.txt 1.0 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 14 15
add_subdirectory(api)
# pten core components
add_subdirectory(core)
# pten kernels for diff device
add_subdirectory(kernels)
C
Chen Weihang 已提交
16 17
# pten infermeta
add_subdirectory(infermeta)
18 19
# pten tests
add_subdirectory(tests)
20 21 22 23

# make an unity target for compile deps
set(PTEN_DEPS convert_utils dense_tensor kernel_factory kernel_context)
set(PTEN_DEPS ${PTEN_DEPS} math_cpu linalg_cpu creation_cpu manipulation_cpu)
24
set(PTEN_DEPS ${PTEN_DEPS} nary unary binary)
25 26 27
if(WITH_GPU OR WITH_ROCM)
  set(PTEN_DEPS ${PTEN_DEPS} math_cuda linalg_cuda creation_cuda manipulation_cuda)
endif()
28 29 30
if(WITH_XPU)
  set(PTEN_DEPS ${PTEN_DEPS} manipulation_xpu)
endif()
31

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