File tree Expand file tree Collapse file tree 5 files changed +9
-3
lines changed Expand file tree Collapse file tree 5 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ option(WITH_C_API "Compile PaddlePaddle with C-API(Prediction)" OFF)
5454option (WITH_GOLANG "Compile PaddlePaddle with GOLANG" OFF )
5555option (GLIDE_INSTALL "Download and install go dependencies " ON )
5656option (USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF )
57+ option (WITH_DISTRIBUTE "Compile with grpc distributed support" OFF )
5758option (USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF )
5859
5960# CMAKE_BUILD_TYPE
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414#
1515
16- IF (MOBILE_INFERENCE)
16+ IF (MOBILE_INFERENCE OR NOT WITH_DISTRIBUTE )
1717 return ()
1818ENDIF ()
1919
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414#
1515
16- IF (MOBILE_INFERENCE)
16+ IF (MOBILE_INFERENCE OR NOT WITH_DISTRIBUTE )
1717 return ()
1818ENDIF ()
1919
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ set(DEPS_OPS
212212 send_op
213213 recv_op)
214214
215+ if (WITH_DISTRIBUTE)
215216add_subdirectory (detail)
216217op_library(send_op SRCS send_op.cc DEPS sendrecvop_grpc grpc++_unsecure grpc_unsecure gpr cares zlib_target protobuf)
217218set_source_files_properties (
@@ -225,6 +226,9 @@ set_source_files_properties(
225226 PROPERTIES
226227 COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor" )
227228
229+ cc_test(test_send_recv SRCS send_recv_op_test.cc DEPS send_op recv_op sum_op executor)
230+ endif ()
231+
228232op_library(cond_op SRCS cond_op.cc DEPS framework_proto tensor operator net_op)
229233op_library(cross_entropy_op DEPS cross_entropy)
230234op_library(softmax_with_cross_entropy_op DEPS cross_entropy softmax)
@@ -275,4 +279,3 @@ if(WITH_GPU)
275279 cc_test(nccl_op_test SRCS nccl_op_test.cu.cc DEPS nccl_op gpu_info device_context)
276280endif ()
277281cc_test(save_load_op_test SRCS save_load_op_test.cc DEPS save_op load_op)
278- cc_test(test_send_recv SRCS send_recv_op_test.cc DEPS send_op recv_op sum_op executor)
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ function cmake_gen() {
3636 ${PYTHON_FLAGS}
3737 -DWITH_DOC=OFF
3838 -DWITH_GPU=${WITH_GPU:- OFF}
39+ -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:- OFF}
3940 -DWITH_MKL=${WITH_MKL:- ON}
4041 -DWITH_AVX=${WITH_AVX:- OFF}
4142 -DWITH_GOLANG=${WITH_GOLANG:- ON}
5758 ${PYTHON_FLAGS} \
5859 -DWITH_DOC=OFF \
5960 -DWITH_GPU=${WITH_GPU:- OFF} \
61+ -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:- OFF} \
6062 -DWITH_MKL=${WITH_MKL:- ON} \
6163 -DWITH_AVX=${WITH_AVX:- OFF} \
6264 -DWITH_GOLANG=${WITH_GOLANG:- ON} \
You can’t perform that action at this time.
0 commit comments