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

4 5
cc_library(errors SRCS errors.cc)
set(pten_enforce_deps errors flags)
X
xiongkun 已提交
6 7 8
if(WITH_GPU)
  set(pten_enforce_deps ${pten_enforce_deps} external_error_proto)
endif()
9
cc_library(pten_enforce INTERFACE SRCS enforce.cc DEPS ${pten_enforce_deps})
10

11
cc_library(kernel_factory SRCS kernel_factory.cc DEPS pten_enforce fluid_convert_utils)
12 13
cc_library(kernel_context SRCS kernel_context.cc DEPS pten_enforce pten_context)

14 15
cc_library(ddim SRCS ddim.cc DEPS pten_enforce)
cc_library(tensor_base SRCS tensor_base.cc allocator.cc DEPS pten_enforce)
16 17
cc_library(tensor_meta SRCS tensor_meta.cc DEPS pten_enforce)
cc_library(lod_utils SRCS lod_utils.cc DEPS pten_enforce)
18 19

cc_library(pten_device_context SRCS device_context.cc DEPS tensor_base)
20
cc_library(dense_tensor SRCS dense_tensor.cc dense_tensor_impl.cc DEPS fluid_convert_utils tensor_meta tensor_base)
21 22
cc_library(sparse_coo_tensor SRCS sparse_coo_tensor.cc DEPS tensor_meta tensor_base)
cc_library(sparse_csr_tensor SRCS sparse_csr_tensor.cc DEPS dense_tensor tensor_base)
23

24
cc_library(meta_tensor SRCS meta_tensor.cc DEPS tensor_base tensor_meta dense_tensor)
25
cc_library(infermeta_utils SRCS infermeta_utils.cc DEPS meta_tensor)
26
cc_library(selected_rows SRCS selected_rows_impl.cc DEPS dense_tensor pten_enforce ddim memcpy)
27

28 29
cc_library(pten_custom_kernel SRCS custom_kernel.cc DEPS kernel_factory convert_utils)

30 31 32
# Will remove once we implemented MKLDNN_Tensor
if(WITH_MKLDNN)
    add_dependencies(dense_tensor mkldnn)
W
Wilber 已提交
33
    add_dependencies(tensor_base mkldnn)
34
endif()