CMakeLists.txt 666 字节
Newer Older
1 2 3 4 5 6
if(WITH_GPU)
  add_subdirectory(cuda)
  nv_library(
    gpu_info
    SRCS gpu_info.cc
    DEPS phi_gpu_info gflags glog enforce monitor dynload_cuda)
7

8 9 10 11 12 13 14 15 16 17 18
  nv_test(cuda_helper_test SRCS cuda_helper_test.cu)
  nv_test(
    cudnn_desc_test
    SRCS cudnn_desc_test.cc
    DEPS dynload_cuda)
elseif(WITH_ROCM)
  add_subdirectory(rocm)
  hip_library(
    gpu_info
    SRCS gpu_info.cc
    DEPS phi_gpu_info gflags glog enforce monitor dynload_cuda)
19

20 21 22 23 24 25
  hip_test(cuda_helper_test SRCS cuda_helper_test.cu)
  hip_test(
    cudnn_desc_test
    SRCS cudnn_desc_test.cc
    DEPS dynload_cuda)
endif()
26

27 28 29 30
cc_library(
  gpu_resource_pool
  SRCS gpu_resource_pool.cc
  DEPS gpu_info)