Skip to content

Commit

Permalink
Remove boost library (#44092)
Browse files Browse the repository at this point in the history
  • Loading branch information
From00 authored Jul 15, 2022
1 parent f913083 commit d2e59e1
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 152 deletions.
64 changes: 0 additions & 64 deletions cmake/external/boost.cmake

This file was deleted.

6 changes: 0 additions & 6 deletions cmake/inference_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,6 @@ copy(
${EIGEN_INCLUDE_DIR}/unsupported/Eigen
DSTS ${dst_dir}/Eigen ${dst_dir}/Eigen ${dst_dir}/unsupported)

set(dst_dir "${PADDLE_INSTALL_DIR}/third_party/boost")
copy(
inference_lib_dist
SRCS ${BOOST_INCLUDE_DIR}/boost
DSTS ${dst_dir})

set(dst_dir "${PADDLE_INSTALL_DIR}/third_party/dlpack")
copy(
inference_lib_dist
Expand Down
21 changes: 4 additions & 17 deletions cmake/third_party.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -246,22 +246,15 @@ endif()
include(external/zlib) # download, build, install zlib
include(external/gflags) # download, build, install gflags
include(external/glog) # download, build, install glog
include(external/boost) # download boost
include(external/eigen) # download eigen3
include(external/threadpool) # download threadpool
include(external/dlpack) # download dlpack
include(external/xxhash) # download, build, install xxhash
include(external/warpctc) # download, build, install warpctc
include(external/utf8proc) # download, build, install utf8proc

list(
APPEND
third_party_deps
extern_eigen3
extern_gflags
extern_glog
extern_boost
extern_xxhash)
list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog
extern_xxhash)
list(
APPEND
third_party_deps
Expand All @@ -272,14 +265,8 @@ list(
extern_utf8proc)
include(external/lapack) # download, build, install lapack

list(
APPEND
third_party_deps
extern_eigen3
extern_gflags
extern_glog
extern_boost
extern_xxhash)
list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog
extern_xxhash)
list(
APPEND
third_party_deps
Expand Down
18 changes: 6 additions & 12 deletions paddle/fluid/distributed/ps/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,35 +86,29 @@ cc_library(
cc_library(
downpour_server
SRCS graph_brpc_server.cc brpc_ps_server.cc
DEPS boost eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})
DEPS eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})
cc_library(
downpour_client
SRCS graph_brpc_client.cc brpc_ps_client.cc ps_local_client.cc
DEPS boost eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})
DEPS eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})

cc_library(
client
SRCS ps_client.cc
DEPS downpour_client boost ${RPC_DEPS})
DEPS downpour_client ${RPC_DEPS})
cc_library(
server
SRCS server.cc
DEPS downpour_server boost ${RPC_DEPS})
DEPS downpour_server ${RPC_DEPS})

cc_library(
communicator
SRCS communicator/communicator.cc
DEPS scope
client
boost
table
math_function
selected_rows_functor
${RPC_DEPS})
DEPS scope client table math_function selected_rows_functor ${RPC_DEPS})
cc_library(
ps_service
SRCS ps_service/service.cc
DEPS communicator client server boost ${RPC_DEPS})
DEPS communicator client server ${RPC_DEPS})

cc_library(
heter_client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ set_source_files_properties(
cc_library(
communicator
SRCS communicator.cc
DEPS scope
client
boost
table
math_function
selected_rows_functor
${RPC_DEPS})
DEPS scope client table math_function selected_rows_functor ${RPC_DEPS})
3 changes: 1 addition & 2 deletions paddle/fluid/distributed/ps/table/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ cc_library(
string_helper
device_context
gflags
glog
boost)
glog)

target_link_libraries(table -fopenmp)
5 changes: 2 additions & 3 deletions paddle/fluid/distributed/ps/table/memory_sparse_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include <sstream>

#include "boost/lexical_cast.hpp"
#include "glog/logging.h"
#include "paddle/fluid/distributed/common/cost_timer.h"
#include "paddle/fluid/framework/io/fs.h"
Expand Down Expand Up @@ -530,7 +529,7 @@ int32_t MemorySparseTable::PullSparsePtr(char** pull_values,
mf_value_size]() -> int {
auto& keys = task_keys[shard_id];
auto& local_shard = _local_shards[shard_id];
float data_buffer[value_size];
float data_buffer[value_size]; // NOLINT
float* data_buffer_ptr = data_buffer;
for (size_t i = 0; i < keys.size(); ++i) {
uint64_t key = keys[i].first;
Expand All @@ -549,7 +548,7 @@ int32_t MemorySparseTable::PullSparsePtr(char** pull_values,
ret = itr.value_ptr();
}
int pull_data_idx = keys[i].second;
pull_values[pull_data_idx] = (char*)ret;
pull_values[pull_data_idx] = (char*)ret; // NOLINT
}
return 0;
});
Expand Down
16 changes: 6 additions & 10 deletions paddle/fluid/distributed/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ cc_test(
client
communicator
ps_service
boost
table
ps_framework_proto
${COMMON_DEPS})
Expand All @@ -48,7 +47,6 @@ cc_test(
client
communicator
ps_service
boost
table
ps_framework_proto
${COMMON_DEPS})
Expand All @@ -71,7 +69,6 @@ cc_test(
client
communicator
ps_service
boost
table
ps_framework_proto
${COMMON_DEPS})
Expand All @@ -87,7 +84,6 @@ cc_test(
client
communicator
ps_service
boost
table
ps_framework_proto
${COMMON_DEPS})
Expand All @@ -105,40 +101,40 @@ set_source_files_properties(
cc_test(
feature_value_test
SRCS feature_value_test.cc
DEPS ${COMMON_DEPS} boost table)
DEPS ${COMMON_DEPS} table)

set_source_files_properties(
sparse_sgd_rule_test.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
cc_test(
sparse_sgd_rule_test
SRCS sparse_sgd_rule_test.cc
DEPS ${COMMON_DEPS} boost table)
DEPS ${COMMON_DEPS} table)

set_source_files_properties(
ctr_accessor_test.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
cc_test(
ctr_accessor_test
SRCS ctr_accessor_test.cc
DEPS ${COMMON_DEPS} boost table)
DEPS ${COMMON_DEPS} table)
set_source_files_properties(
ctr_dymf_accessor_test.cc PROPERTIES COMPILE_FLAGS
${DISTRIBUTE_COMPILE_FLAGS})
cc_test(
ctr_dymf_accessor_test
SRCS ctr_dymf_accessor_test.cc
DEPS ${COMMON_DEPS} boost table)
DEPS ${COMMON_DEPS} table)

set_source_files_properties(
memory_sparse_table_test.cc PROPERTIES COMPILE_FLAGS
${DISTRIBUTE_COMPILE_FLAGS})
cc_test(
memory_sparse_table_test
SRCS memory_sparse_table_test.cc
DEPS ${COMMON_DEPS} boost table)
DEPS ${COMMON_DEPS} table)

set_source_files_properties(
memory_geo_table_test.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
cc_test(
memory_sparse_geo_table_test
SRCS memory_geo_table_test.cc
DEPS ${COMMON_DEPS} boost table)
DEPS ${COMMON_DEPS} table)
12 changes: 6 additions & 6 deletions paddle/fluid/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ proto_library(op_def_proto SRCS op_def.proto DEPS framework_proto)
cc_library(
op_def_api
SRCS op_def_api.cc
DEPS op_def_proto boost)
DEPS op_def_proto)

file(GLOB OP_DEF_FILES
${PADDLE_SOURCE_DIR}/paddle/fluid/operators/compat/*.pbtxt)
Expand Down Expand Up @@ -341,7 +341,7 @@ cc_library(
cc_library(
attribute
SRCS attribute.cc
DEPS framework_proto boost enforce)
DEPS framework_proto enforce)
cc_test(
attribute_test
SRCS attribute_test.cc
Expand All @@ -354,12 +354,12 @@ cc_test(
cc_library(
op_version_proto
SRCS op_version_proto.cc
DEPS framework_proto boost)
DEPS framework_proto)

cc_library(
op_version_registry
SRCS op_version_registry.cc
DEPS op_version_proto framework_proto boost)
DEPS op_version_proto framework_proto)
cc_test(
op_version_registry_test
SRCS op_version_registry_test.cc
Expand Down Expand Up @@ -519,7 +519,7 @@ cc_test(
cc_library(
program_processing
SRCS program_processing.cc
DEPS boost proto_desc)
DEPS proto_desc)
cc_test(
program_processing_test
SRCS program_processing_test.cc
Expand Down Expand Up @@ -1025,7 +1025,7 @@ endif()
cc_library(
prune
SRCS prune.cc
DEPS framework_proto boost)
DEPS framework_proto)
cc_test(
prune_test
SRCS prune_test.cc
Expand Down
1 change: 0 additions & 1 deletion paddle/fluid/framework/details/build_strategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <utility>
#include <vector>

#include "boost/optional.hpp"
#include "paddle/fluid/framework/ir/pass_builder.h"
#include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/framework/scope.h"
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cc_library(
cc_library(
fs
SRCS fs.cc
DEPS string_helper glog boost enforce shell)
DEPS string_helper glog enforce shell)

cc_test(
test_fs
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/framework/paddle2cinn/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cc_library(
cinn_cache_key
SRCS cinn_cache_key.cc
DEPS boost graph graph_helper lod_tensor proto_desc)
DEPS graph graph_helper lod_tensor proto_desc)
cc_library(
build_cinn_pass
SRCS build_cinn_pass.cc
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/inference/lite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ endif()
cc_library(
lite_op_teller
SRCS op_teller.cc
DEPS ${LITE_DEPS} framework_proto device_context boost xxhash)
DEPS ${LITE_DEPS} framework_proto device_context xxhash)
cc_library(
lite_engine
SRCS engine.cc
DEPS ${LITE_DEPS} framework_proto ${XPU_DEPS})
cc_library(
lite_tensor_utils
SRCS tensor_utils.cc
DEPS memcpy ${LITE_DEPS} framework_proto boost device_context ${XPU_DEPS})
DEPS memcpy ${LITE_DEPS} framework_proto device_context ${XPU_DEPS})
cc_test(
test_lite_engine
SRCS test_engine_lite.cc
Expand Down
Loading

0 comments on commit d2e59e1

Please sign in to comment.