CMakeLists.txt 741 字节
Newer Older
1 2
# pten (low level) api headers: include
# pten (high level) api
3 4 5 6 7
add_subdirectory(api)
# pten core components
add_subdirectory(core)
# pten kernels for diff device
add_subdirectory(kernels)
C
Chen Weihang 已提交
8 9
# pten infermeta
add_subdirectory(infermeta)
10 11
# pten tests
add_subdirectory(tests)
12 13 14 15

# 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)
16
set(PTEN_DEPS ${PTEN_DEPS} nary unary binary)
17 18 19
if(WITH_GPU OR WITH_ROCM)
  set(PTEN_DEPS ${PTEN_DEPS} math_cuda linalg_cuda creation_cuda manipulation_cuda)
endif()
20 21 22
if(WITH_XPU)
  set(PTEN_DEPS ${PTEN_DEPS} manipulation_xpu)
endif()
23
cc_library(pten SRCS all.cc DEPS ${PTEN_DEPS})