CMakeLists.txt 992 字节
Newer Older
1 2
add_subdirectory(dynload)

W
Wilber 已提交
3
add_subdirectory(cpu)
4

5 6
add_subdirectory(custom)

W
Wilber 已提交
7 8 9 10
if(WITH_GPU OR WITH_ROCM)
  add_subdirectory(gpu)
endif()

W
Wilber 已提交
11 12 13 14
if(WITH_XPU)
  add_subdirectory(xpu)
endif()

15
cc_library(phi_context SRCS all_context.cc DEPS device_context cpu_context)
W
Wilber 已提交
16 17

if(WITH_XPU)
18
  add_dependencies(phi_context xpu_context)
W
Wilber 已提交
19
endif()
W
Wilber 已提交
20 21

if(WITH_GPU)
22
  add_dependencies(phi_context gpu_context)
W
Wilber 已提交
23
endif()
24 25

if(WITH_CUSTOM_DEVICE)
26
  add_dependencies(phi_context custom_context)
27 28 29 30 31 32 33
  cc_library(callback_manager SRCS callback_manager.cc DEPS enforce place)
  cc_library(device_guard SRCS device_guard.cc DEPS enforce place)
  cc_library(stream SRCS stream.cc DEPS callback_manager)
  cc_library(event SRCS event.cc DEPS enforce place)
  cc_library(device_base SRCS device_base.cc DEPS stream event callback_manager device_guard device_context flags)
  cc_library(device_manager SRCS device_manager.cc DEPS custom_device)
  set(GLOB_DEV_LIB device_manager custom_device CACHE INTERNAL "Global DEV library")
34
endif()