CMakeLists.txt 3.3 KB
Newer Older
T
tangwei12 已提交
1
set_property(GLOBAL PROPERTY TABLE_DEPS string_helper)
S
seemingwang 已提交
2
set(graphDir graph)
T
tangwei12 已提交
3
get_property(TABLE_DEPS GLOBAL PROPERTY TABLE_DEPS)
4 5 6
set_source_files_properties(
  ${graphDir}/graph_edge.cc PROPERTIES COMPILE_FLAGS
                                       ${DISTRIBUTE_COMPILE_FLAGS})
S
seemingwang 已提交
7
cc_library(graph_edge SRCS ${graphDir}/graph_edge.cc)
8 9 10 11 12 13 14 15 16 17 18 19 20
set_source_files_properties(
  ${graphDir}/graph_weighted_sampler.cc PROPERTIES COMPILE_FLAGS
                                                   ${DISTRIBUTE_COMPILE_FLAGS})
cc_library(
  WeightedSampler
  SRCS ${graphDir}/graph_weighted_sampler.cc
  DEPS graph_edge)
set_source_files_properties(
  ${graphDir}/graph_node.cc PROPERTIES COMPILE_FLAGS
                                       ${DISTRIBUTE_COMPILE_FLAGS})
cc_library(
  graph_node
  SRCS ${graphDir}/graph_node.cc
D
danleifeng 已提交
21
  DEPS WeightedSampler enforce)
22 23 24 25 26 27
set_source_files_properties(
  memory_dense_table.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  barrier_table.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  common_graph_table.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
T
tangwei12 已提交
28

T
Thunderbrook 已提交
29 30
get_property(RPC_DEPS GLOBAL PROPERTY RPC_DEPS)

31
set(PADDLE_LIB_THIRD_PARTY_PATH "${PADDLE_LIB}/third_party/")
32 33
include_directories(
  ${PADDLE_LIB_THIRD_PARTY_PATH}libmct/src/extern_libmct/libmct/include)
34 35 36

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")

Z
zhaocaibei123 已提交
37 38
set(TABLE_SRC memory_dense_table.cc barrier_table.cc common_graph_table.cc)
#set(EXTERN_DEP rocksdb)
T
Thunderbrook 已提交
39

40 41 42 43 44 45 46 47 48 49 50
cc_library(
  common_table
  SRCS ${TABLE_SRC}
  DEPS ${TABLE_DEPS}
       ${RPC_DEPS}
       graph_edge
       graph_node
       device_context
       string_helper
       simple_threadpool
       xxhash
51
       phi)
T
tangwei12 已提交
52

53 54
set_source_files_properties(
  tensor_accessor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
T
tangwei12 已提交
55

56 57
set_source_files_properties(table.cc PROPERTIES COMPILE_FLAGS
                                                ${DISTRIBUTE_COMPILE_FLAGS})
T
tangwei12 已提交
58

59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
set_source_files_properties(
  sparse_sgd_rule.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  ctr_double_accessor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  ctr_accessor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  sparse_accessor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  ctr_dymf_accessor.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  memory_sparse_table.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  ssd_sparse_table.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
set_source_files_properties(
  memory_sparse_geo_table.cc PROPERTIES COMPILE_FLAGS
                                        ${DISTRIBUTE_COMPILE_FLAGS})
Z
zhaocaibei123 已提交
76

77
cc_library(
Z
zhaocaibei123 已提交
78
  table
79
  SRCS sparse_sgd_rule.cc
Z
zhaocaibei123 已提交
80 81 82
       ctr_accessor.cc
       ctr_double_accessor.cc
       sparse_accessor.cc
83
       ctr_dymf_accessor.cc
Z
zhaocaibei123 已提交
84 85 86 87 88 89
       tensor_accessor.cc
       memory_sparse_table.cc
       ssd_sparse_table.cc
       memory_sparse_geo_table.cc
       table.cc
  DEPS ${TABLE_DEPS}
90 91 92 93
       common_table
       ps_framework_proto
       string_helper
       device_context
94
       phi
Z
zhaocaibei123 已提交
95 96 97 98 99
       glog
       fs
       afs_wrapper
       rocksdb
       eigen3)
100 101

target_link_libraries(table -fopenmp)