Skip to content

Commit 0f4a020

Browse files
committed
add fopenmp
1 parent 6ad5160 commit 0f4a020

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

paddle/fluid/distributed/table/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ get_property(RPC_DEPS GLOBAL PROPERTY RPC_DEPS)
1919
set(PADDLE_LIB_THIRD_PARTY_PATH "${PADDLE_LIB}/third_party/")
2020
include_directories(${PADDLE_LIB_THIRD_PARTY_PATH}libmct/src/extern_libmct/libmct/include)
2121

22+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
23+
2224
set(EXTERN_DEP "")
2325
if(WITH_HETERPS)
2426
set(TABLE_SRC common_sparse_table.cc ssd_sparse_table.cc common_dense_table.cc sparse_geo_table.cc barrier_table.cc common_graph_table.cc)
@@ -47,4 +49,4 @@ cc_library(memory_sparse_table SRCS memory_sparse_table.cc DEPS ps_framework_pro
4749

4850
cc_library(table SRCS table.cc DEPS memory_sparse_table common_table tensor_accessor tensor_table ps_framework_proto string_helper device_context gflags glog boost)
4951

50-
target_link_libraries(table -lgomp)
52+
target_link_libraries(table -fopenmp)

paddle/fluid/distributed/table/common_dense_table.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CommonDenseTable : public DenseTable {
5757
int32_t _push_dense(const float* values, size_t num);
5858

5959
private:
60-
const int task_pool_size_ = 1;
60+
const int task_pool_size_ = 10;
6161
bool sync = true;
6262
std::vector<std::shared_ptr<::ThreadPool>> _shards_task_pool;
6363
int param_dim_ = 0;

0 commit comments

Comments
 (0)