CMakeLists.txt 814 字节
Newer Older
J
jianghaicheng 已提交
1
IF(WITH_IPU)
2
  FILE(GLOB POPART_CANONICALIZATION_SRC ${PADDLE_SOURCE_DIR}/paddle/fluid/platform/device/ipu/popart_canonicalization/*.cc)
A
Allen Guo 已提交
3 4 5 6 7 8 9 10
  list(APPEND PADDLE_IPU_SRC ${POPART_CANONICALIZATION_SRC})
  set(IPU_BACKEND_SRC
    "ipu_strategy.cc"
    "ipu_executor.cc"
    "ipu_compiler.cc"
    "ipu_backend.cc"
    "ipu_utils.cc"
  )
A
Allen Guo 已提交
11 12 13 14
  set(IPU_INFO_SRC
    "ipu_info.cc"
    "ipu_device.cc"
  )
A
Allen Guo 已提交
15

A
Allen Guo 已提交
16
  cc_library(ipu_backend SRCS ${IPU_BACKEND_SRC} DEPS popart-only graph graph_helper popdist)
A
Allen Guo 已提交
17 18
  cc_library(ipu_info SRCS ${IPU_INFO_SRC} DEPS popart-only enforce)
  add_library(paddle_ipu SHARED ${PADDLE_IPU_SRC})
A
Allen Guo 已提交
19
  add_dependencies(paddle_ipu ipu_backend)
A
Allen Guo 已提交
20 21
  set(PADDLE_IPU_LIB "${CMAKE_CURRENT_BINARY_DIR}/libpaddle_ipu.so" CACHE STRING "")
  set(PADDLE_IPU_LIB_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE STRING "")
J
jianghaicheng 已提交
22
ENDIF()