CMakeLists.txt 1.4 KB
Newer Older
1 2 3 4 5 6 7 8
cc_library(
  processgroup
  SRCS ProcessGroup.cc
  DEPS phi_api eager_api)
cc_library(
  eager_reducer
  SRCS reducer.cc
  DEPS eager_api processgroup phi_api string_helper)
9

10 11 12 13 14
if(WITH_DISTRIBUTE)
  cc_library(
    processgroup_gloo
    SRCS ProcessGroupGloo.cc
    DEPS phi_api eager_api gloo_wrapper)
15
endif()
16 17

if(WITH_NCCL)
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
  cc_library(
    processgroup_nccl
    SRCS ProcessGroupNCCL.cc NCCLTools.cc Common.cc
    DEPS place
         cuda_stream
         enforce
         collective_helper
         device_context
         phi_api
         eager_api)
  if(WITH_DISTRIBUTE AND WITH_PSCORE)
    cc_library(
      processgroup_heter
      SRCS ProcessGroupHeter.cc NCCLTools.cc Common.cc
      DEPS place
           cuda_stream
           enforce
           collective_helper
           device_context
           phi_api
           eager_api)
L
lilong12 已提交
39
  endif()
40
endif()
L
lilong12 已提交
41

42
if(WITH_ASCEND_CL)
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  cc_library(
    processgroup_hccl
    SRCS ProcessGroupHCCL.cc HCCLTools.cc Common.cc
    DEPS place
         npu_stream
         enforce
         collective_helper
         device_context
         phi_api
         eager_api)
  if(WITH_DISTRIBUTE AND WITH_PSCORE)
    cc_library(
      processgroup_heter
      SRCS ProcessGroupHeter.cc HCCLTools.cc Common.cc
      DEPS place
           npu_stream
           enforce
           collective_helper
           device_context
           phi_api
           eager_api)
L
lilong12 已提交
64
  endif()
65
endif()