CMakeLists.txt 1.7 KB
Newer Older
1 2 3
# utils used for compatible for fluid op system
add_subdirectory(compat)

4
if(WITH_GPU)
5
  cc_library(convert_utils SRCS convert_utils.cc DEPS data_type place gpu_info)
6
elseif(WITH_ROCM)
7
  cc_library(convert_utils SRCS convert_utils.cc DEPS data_type place gpu_info)
8
else()
9
  cc_library(convert_utils SRCS convert_utils.cc DEPS data_type place)
10 11
endif()

12 13
cc_library(errors SRCS errors.cc)
set(pten_enforce_deps errors flags)
X
xiongkun 已提交
14 15 16
if(WITH_GPU)
  set(pten_enforce_deps ${pten_enforce_deps} external_error_proto)
endif()
17
cc_library(pten_enforce INTERFACE SRCS enforce.cc DEPS ${pten_enforce_deps})
18

19 20 21 22 23 24
cc_library(kernel_factory SRCS kernel_factory.cc DEPS pten_enforce convert_utils)
cc_library(kernel_context SRCS kernel_context.cc DEPS pten_enforce pten_context)

cc_library(tensor_base SRCS tensor_base.cc allocator.cc storage.cc DEPS pten_enforce)
cc_library(tensor_meta SRCS tensor_meta.cc DEPS pten_enforce mixed_vector)
cc_library(lod_utils SRCS lod_utils.cc DEPS pten_enforce mixed_vector)
25
cc_library(dense_tensor SRCS dense_tensor.cc dense_tensor_impl.cc DEPS convert_utils tensor_meta tensor_base)
W
Wilber 已提交
26
cc_library(pten_device_context SRCS device_context.cc DEPS tensor_base )
27

28
cc_library(meta_tensor SRCS meta_tensor.cc DEPS tensor_base tensor_meta dense_tensor)
29
cc_library(infermeta_utils SRCS infermeta_utils.cc DEPS meta_tensor)
30
cc_library(selected_rows SRCS selected_rows.cc DEPS dense_tensor mixed_vector pten_enforce ddim)
31

32 33 34
cc_test(unroll_array_ops_test SRCS unroll_array_ops_test.cc)
cc_library(ddim SRCS ddim.cc DEPS eigen3 boost enforce)

35 36 37
# Will remove once we implemented MKLDNN_Tensor
if(WITH_MKLDNN)
    add_dependencies(dense_tensor mkldnn)
W
Wilber 已提交
38
    add_dependencies(tensor_base mkldnn)
39
endif()