Skip to content

Commit 9785e47

Browse files
authored
Merge branch 'develop' into optimize/sparse_kv
2 parents b371177 + 90133d2 commit 9785e47

File tree

437 files changed

+21230
-20747
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+21230
-20747
lines changed

CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ option(WITH_TENSORRT "Compile PaddlePaddle with NVIDIA TensorRT" OFF)
3333
option(WITH_XPU "Compile PaddlePaddle with BAIDU KUNLUN XPU" OFF)
3434
option(WITH_WIN_DUMP_DBG "Compile with windows core dump debug mode" OFF)
3535
option(WITH_ASCEND "Compile PaddlePaddle with ASCEND" OFF)
36+
option(WITH_ROCM "Compile PaddlePaddle with ROCM platform" OFF)
3637
# NOTE(zhiqiu): WITH_ASCEND_CL can be compile on x86_64, so we can set WITH_ASCEND=OFF and WITH_ASCEND_CL=ON
3738
# to develop some acl related functionality on x86
3839
option(WITH_ASCEND_CL "Compile PaddlePaddle with ASCEND CL" ${WITH_ASCEND})
@@ -43,6 +44,9 @@ endif()
4344
if (WITH_GPU AND WITH_ASCEND)
4445
message(FATAL_ERROR "Error when compile GPU and ASCEND at the same time")
4546
endif()
47+
if (WITH_GPU AND WITH_ROCM)
48+
message(FATAL_ERROR "Error when compile CUDA and ROCM at the same time")
49+
endif()
4650

4751
if(WITH_GPU AND NOT APPLE)
4852
enable_language(CUDA)
@@ -168,8 +172,6 @@ option(WITH_DISTRIBUTE "Compile with distributed support" OFF)
168172
option(WITH_BRPC_RDMA "Use brpc rdma as the rpc protocal" OFF)
169173
option(ON_INFER "Turn on inference optimization and inference-lib generation" OFF)
170174
################################ Internal Configurations #######################################
171-
option(WITH_ROCM "Compile PaddlePaddle with ROCM platform" OFF)
172-
option(WITH_RCCL "Compile PaddlePaddle with RCCL support" OFF)
173175
option(WITH_NV_JETSON "Compile PaddlePaddle with NV JETSON" OFF)
174176
option(WITH_PROFILER "Compile PaddlePaddle with GPU profiler and gperftools" OFF)
175177
option(WITH_COVERAGE "Compile PaddlePaddle with code coverage" OFF)
@@ -182,12 +184,14 @@ option(WITH_XBYAK "Compile with xbyak support" ON)
182184
option(WITH_CONTRIB "Compile the third-party contributation" OFF)
183185
option(WITH_GRPC "Use grpc as the default rpc framework" ${WITH_DISTRIBUTE})
184186
option(WITH_PSCORE "Compile with parameter server support" ${WITH_DISTRIBUTE})
187+
option(WITH_HETERPS "Compile with heterps" OFF})
185188
option(WITH_INFERENCE_API_TEST "Test fluid inference C++ high-level api interface" OFF)
186189
option(PY_VERSION "Compile PaddlePaddle with python3 support" ${PY_VERSION})
187190
option(WITH_DGC "Use DGC(Deep Gradient Compression) or not" ${WITH_DISTRIBUTE})
188191
option(SANITIZER_TYPE "Choose the type of sanitizer, options are: Address, Leak, Memory, Thread, Undefined" OFF)
189192
option(WITH_LITE "Compile Paddle Fluid with Lite Engine" OFF)
190193
option(WITH_NCCL "Compile PaddlePaddle with NCCL support" ON)
194+
option(WITH_RCCL "Compile PaddlePaddle with RCCL support" ON)
191195
option(WITH_XPU_BKCL "Compile PaddlePaddle with BAIDU KUNLUN XPU BKCL" OFF)
192196
option(WITH_CRYPTO "Compile PaddlePaddle with crypto support" ON)
193197
option(WITH_ARM "Compile PaddlePaddle with arm support" OFF)
@@ -305,9 +309,9 @@ endif(WITH_ROCM)
305309

306310
if (NOT WITH_ROCM AND WITH_RCCL)
307311
MESSAGE(WARNING
308-
"Disable RCCL when compiling without GPU. Force WITH_RCCL=OFF.")
309-
set(WITH_NCCL OFF CACHE STRING
310-
"Disable RCCL when compiling without GPU" FORCE)
312+
"Disable RCCL when compiling without ROCM. Force WITH_RCCL=OFF.")
313+
set(WITH_RCCL OFF CACHE STRING
314+
"Disable RCCL when compiling without ROCM" FORCE)
311315
endif()
312316

313317
if(WITH_RCCL)

cmake/configure.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ if(WITH_PSCORE)
173173
add_definitions(-DPADDLE_WITH_PSCORE)
174174
endif()
175175

176+
if(WITH_HETERPS)
177+
add_definitions(-DPADDLE_WITH_HETERPS)
178+
endif()
176179

177180
if(WITH_GRPC)
178181
add_definitions(-DPADDLE_WITH_GRPC)

cmake/external/gloo.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cache_third_party(extern_gloo
3232
TAG ${GLOO_TAG}
3333
DIR GLOO_SOURCE_DIR)
3434

35-
if(WITH_ASCEND)
35+
if(WITH_ASCEND OR WITH_ASCEND_CL)
3636
ExternalProject_Add(
3737
extern_gloo
3838
${EXTERNAL_PROJECT_LOG_ARGS}

cmake/external/grpc.cmake

Lines changed: 0 additions & 77 deletions
This file was deleted.

cmake/external/mkldnn.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SET(MKLDNN_SOURCE_DIR ${THIRD_PARTY_PATH}/mkldnn/src/extern_mkldnn)
2020
SET(MKLDNN_INSTALL_DIR ${THIRD_PARTY_PATH}/install/mkldnn)
2121
SET(MKLDNN_INC_DIR "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE)
2222
SET(MKLDNN_REPOSITORY ${GIT_URL}/oneapi-src/oneDNN.git)
23-
SET(MKLDNN_TAG 72efa005effb49595933e033cc732f215ef0445a)
23+
SET(MKLDNN_TAG f58682cd8bd0615f41d879f8afc8f1511ab42d24)
2424

2525
# Introduce variables:
2626
# * CMAKE_INSTALL_LIBDIR

cmake/external/protobuf.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ endif()
242242
)
243243
ENDFUNCTION()
244244

245-
if(WITH_ASCEND)
245+
if(WITH_ASCEND OR WITH_ASCEND_CL)
246246
SET(PROTOBUF_VERSION 3.8.0)
247247
else()
248248
SET(PROTOBUF_VERSION 3.1.0)

cmake/external/threadpool.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ INCLUDE(ExternalProject)
1616

1717
SET(THREADPOOL_PREFIX_DIR ${THIRD_PARTY_PATH}/threadpool)
1818
SET(THREADPOOL_SOURCE_DIR ${THIRD_PARTY_PATH}/threadpool/src/extern_threadpool)
19-
if(WITH_ASCEND)
19+
if(WITH_ASCEND OR WITH_ASCEND_CL)
2020
SET(THREADPOOL_REPOSITORY https://gitee.com/tianjianhe/ThreadPool.git)
2121
else()
2222
SET(THREADPOOL_REPOSITORY ${GIT_URL}/progschj/ThreadPool.git)

cmake/external/warpctc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cache_third_party(extern_warpctc
4343
TAG ${WARPCTC_TAG}
4444
DIR WARPCTC_SOURCE_DIR)
4545

46-
if(WITH_ASCEND)
46+
if(WITH_ASCEND OR WITH_ASCEND_CL)
4747
ExternalProject_Add(
4848
extern_warpctc
4949
${EXTERNAL_PROJECT_LOG_ARGS}

paddle/fluid/distributed/service/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ set_source_files_properties(communicator.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUT
1616
set_source_files_properties(service.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
1717
set_source_files_properties(brpc_ps_server.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
1818
set_source_files_properties(brpc_ps_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
19+
set_source_files_properties(ps_local_client.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
1920

2021
set_source_files_properties(brpc_utils.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
2122
set_source_files_properties(heter_server.cc PROPERTIES COMPILE_FLAGS ${DISTRIBUTE_COMPILE_FLAGS})
@@ -29,7 +30,8 @@ set_source_files_properties(graph_brpc_client.cc PROPERTIES COMPILE_FLAGS ${DIST
2930
cc_library(brpc_utils SRCS brpc_utils.cc DEPS tensor device_context ${COMMON_DEPS} ${RPC_DEPS})
3031

3132
cc_library(downpour_server SRCS graph_brpc_server.cc brpc_ps_server.cc DEPS boost eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})
32-
cc_library(downpour_client SRCS graph_brpc_client.cc brpc_ps_client.cc DEPS boost eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})
33+
cc_library(downpour_client SRCS graph_brpc_client.cc brpc_ps_client.cc
34+
ps_local_client.cc DEPS boost eigen3 table brpc_utils simple_threadpool ${RPC_DEPS})
3335

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

paddle/fluid/distributed/service/brpc_ps_client.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,8 +880,8 @@ std::future<int32_t> BrpcPsClient::send_client2client_msg(
880880
auto promise = std::make_shared<std::promise<int32_t>>();
881881
std::future<int> fut = promise->get_future();
882882
if (to_client_id >= _client_channels.size()) {
883-
LOG(FATAL) << "to_client_id is out of range clients, which size is "
884-
<< _client_channels.size();
883+
VLOG(0) << "to_client_id is out of range clients, which size is "
884+
<< _client_channels.size();
885885
promise->set_value(-1);
886886
return fut;
887887
}
@@ -1001,4 +1001,4 @@ int32_t BrpcPsClient::recv_and_save_table(const uint64_t table_id,
10011001
}
10021002

10031003
} // namespace distributed
1004-
} // namespace paddle
1004+
} // namespace paddle

0 commit comments

Comments
 (0)