CMakeLists.txt 1.4 KB
Newer Older
Q
Qiao Longfei 已提交
1
cc_library(dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags enforce)
2

3
list(APPEND CUDA_SRCS cublas.cc cudnn.cc curand.cc cusolver.cc nvtx.cc nvjpeg.cc)
4 5 6

if (WITH_ROCM)
  list(APPEND HIP_SRCS rocblas.cc miopen.cc hiprand.cc)
Y
Y_Xuan 已提交
7
endif()
Y
Yi Wang 已提交
8 9

# There is no macOS version of NCCL.
10
# Disable nvrtc and cuda_driver api on MacOS and Windows, and only do a early test on Linux.
D
dzhwinter 已提交
11
if (NOT APPLE AND NOT WIN32)
12
    list(APPEND CUDA_SRCS nvrtc.cc cuda_driver.cc)
13 14 15
  if (WITH_NCCL)
    list(APPEND CUDA_SRCS nccl.cc)
  endif()
16
  if (WITH_ROCM)
Y
Y_Xuan 已提交
17 18 19 20 21
    list(APPEND HIP_SRCS hiprtc.cc rocm_driver.cc)
    if (WITH_RCCL)
      list(APPEND HIP_SRCS rccl.cc)
    endif()
  endif()
Y
Yi Wang 已提交
22 23
endif()

L
Luo Tao 已提交
24
if (TENSORRT_FOUND)
Y
Yan Chunwei 已提交
25 26 27
  list(APPEND CUDA_SRCS tensorrt.cc)
endif()

28
configure_file(cupti_lib_path.h.in ${CMAKE_CURRENT_BINARY_DIR}/cupti_lib_path.h)
29 30 31
if (CUPTI_FOUND)
    list(APPEND CUDA_SRCS cupti.cc)
endif(CUPTI_FOUND)
32
if(WITH_ROCM)
Y
Y_Xuan 已提交
33
  hip_library(dynload_cuda SRCS ${HIP_SRCS} DEPS dynamic_loader)
34
  cc_library(dynload_warpctc SRCS warpctc.cc DEPS dynamic_loader warpctc)
35 36
elseif (WITH_ASCEND_CL)
  cc_library(dynload_warpctc SRCS warpctc.cc hccl.cc DEPS dynamic_loader warpctc)
Y
Y_Xuan 已提交
37 38 39 40
else()
  nv_library(dynload_cuda SRCS ${CUDA_SRCS} DEPS dynamic_loader)
  cc_library(dynload_warpctc SRCS warpctc.cc DEPS dynamic_loader warpctc)
endif()
41 42 43 44
if (WITH_MKLML)
    cc_library(dynload_mklml SRCS mklml.cc DEPS dynamic_loader mklml)
endif()
# TODO(TJ): add iomp, mkldnn?