CMakeLists.txt 1.2 KB
Newer Older
1
if(WITH_GPU)
2
  cc_library(convert_utils SRCS convert_utils.cc DEPS data_type place gpu_info)
3
elseif(WITH_ROCM)
4
  cc_library(convert_utils SRCS convert_utils.cc DEPS data_type place gpu_info)
5
else()
6
  cc_library(convert_utils SRCS convert_utils.cc DEPS data_type place)
7 8
endif()

9
cc_library(kernel_factory SRCS kernel_factory.cc DEPS enforce convert_utils)
10
cc_library(kernel_context SRCS kernel_context.cc DEPS enforce pten_context)
11
cc_library(arg_map_context SRCS arg_map_context.cc DEPS enforce)
12

13
cc_library(tensor_base SRCS tensor_base.cc allocator.cc storage.cc DEPS enforce)
14
cc_library(tensor_meta SRCS tensor_meta.cc DEPS enforce mixed_vector)
15
cc_library(dense_tensor SRCS dense_tensor.cc DEPS convert_utils tensor_meta tensor_base)
W
Wilber 已提交
16
cc_library(pten_device_context SRCS device_context.cc DEPS tensor_base )
17

18 19 20 21 22 23 24 25 26
cc_test(unroll_array_ops_test SRCS unroll_array_ops_test.cc)
cc_library(ddim SRCS ddim.cc DEPS eigen3 boost enforce)
cc_test(ddim_test SRCS ddim_test.cc DEPS ddim)
if(WITH_GPU)
  nv_test(dim_test SRCS dim_test.cu DEPS ddim)
elseif(WITH_ROCM)
  hip_test(dim_test SRCS dim_test.cu DEPS ddim)
endif()

27 28 29
# Will remove once we implemented MKLDNN_Tensor
if(WITH_MKLDNN)
    add_dependencies(dense_tensor mkldnn)
W
Wilber 已提交
30
    add_dependencies(tensor_base mkldnn)
31
endif()