CMakeLists.txt 1.0 KB
Newer Older
L
liaogang 已提交
1 2
cc_library(cpu_info SRCS cpu_info.cc DEPS gflags glog)
cc_test(cpu_info_test SRCS cpu_info_test.cc DEPS cpu_info)
L
liaogang 已提交
3

L
liaogang 已提交
4
nv_library(gpu_info SRCS gpu_info.cc DEPS gflags glog)
5

F
fengjiayi 已提交
6
cc_library(place SRCS place.cc)
L
liaogang 已提交
7
cc_test(place_test SRCS place_test.cc DEPS place glog gflags)
L
liaogang 已提交
8

L
liaogang 已提交
9
add_subdirectory(dynload)
L
liaogang 已提交
10

Y
Yi Wang 已提交
11
cc_test(enforce_test SRCS enforce_test.cc DEPS stringpiece)
L
liaogang 已提交
12

Q
qijun 已提交
13 14 15 16 17 18
IF(WITH_GPU)
    set(GPU_CTX_DEPS dynload_cuda dynamic_loader)
ELSE()
    set(GPU_CTX_DEPS)
ENDIF()

Q
qijun 已提交
19 20 21 22
# memcpy deoends on device_context, here add deps individually for
# avoiding cycle dependencies
cc_library(device_context SRCS device_context.cc DEPS memory buddy_allocator
    system_allocator memory_block meta_data meta_cache place eigen3 ${GPU_CTX_DEPS})
L
liaogang 已提交
23
nv_test(device_context_test SRCS device_context_test.cc DEPS device_context gpu_info)
24 25

nv_test(cudnn_helper_test SRCS cudnn_helper_test.cc DEPS dynload_cuda)
Y
Yu Yang 已提交
26
nv_test(transform_test SRCS transform_test.cu DEPS paddle_memory place device_context)
Y
Yu Yang 已提交
27
nv_test(nccl_test SRCS nccl_test.cu DEPS dynload_cuda gpu_info device_context)