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)
54
54
option (WITH_GOLANG "Compile PaddlePaddle with GOLANG" OFF )
55
55
option (GLIDE_INSTALL "Download and install go dependencies " ON )
56
56
option (USE_NNPACK "Compile PaddlePaddle with NNPACK library" OFF )
57
+ option (WITH_DISTRIBUTE "Compile with grpc distributed support" OFF )
57
58
option (USE_EIGEN_FOR_BLAS "Use matrix multiplication in Eigen" OFF )
58
59
59
60
# CMAKE_BUILD_TYPE
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
#
15
15
16
- IF (MOBILE_INFERENCE )
16
+ IF (MOBILE_INFERENCE OR NOT WITH_DISTRIBUTE )
17
17
return ()
18
18
ENDIF ()
19
19
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
#
15
15
16
- IF (MOBILE_INFERENCE )
16
+ IF (MOBILE_INFERENCE OR NOT WITH_DISTRIBUTE )
17
17
return ()
18
18
ENDIF ()
19
19
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ set(DEPS_OPS
212
212
send_op
213
213
recv_op )
214
214
215
+ if (WITH_DISTRIBUTE )
215
216
add_subdirectory (detail )
216
217
op_library (send_op SRCS send_op.cc DEPS sendrecvop_grpc grpc++_unsecure grpc_unsecure gpr cares zlib_target protobuf )
217
218
set_source_files_properties (
@@ -225,6 +226,9 @@ set_source_files_properties(
225
226
PROPERTIES
226
227
COMPILE_FLAGS "-Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor" )
227
228
229
+ cc_test (test_send_recv SRCS send_recv_op_test.cc DEPS send_op recv_op sum_op executor )
230
+ endif ()
231
+
228
232
op_library (cond_op SRCS cond_op.cc DEPS framework_proto tensor operator net_op )
229
233
op_library (cross_entropy_op DEPS cross_entropy )
230
234
op_library (softmax_with_cross_entropy_op DEPS cross_entropy softmax )
@@ -275,4 +279,3 @@ if(WITH_GPU)
275
279
cc_test (nccl_op_test SRCS nccl_op_test.cu.cc DEPS nccl_op gpu_info device_context )
276
280
endif ()
277
281
cc_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() {
36
36
${PYTHON_FLAGS}
37
37
-DWITH_DOC=OFF
38
38
-DWITH_GPU=${WITH_GPU:- OFF}
39
+ -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:- OFF}
39
40
-DWITH_MKL=${WITH_MKL:- ON}
40
41
-DWITH_AVX=${WITH_AVX:- OFF}
41
42
-DWITH_GOLANG=${WITH_GOLANG:- ON}
57
58
${PYTHON_FLAGS} \
58
59
-DWITH_DOC=OFF \
59
60
-DWITH_GPU=${WITH_GPU:- OFF} \
61
+ -DWITH_DISTRIBUTE=${WITH_DISTRIBUTE:- OFF} \
60
62
-DWITH_MKL=${WITH_MKL:- ON} \
61
63
-DWITH_AVX=${WITH_AVX:- OFF} \
62
64
-DWITH_GOLANG=${WITH_GOLANG:- ON} \
You can’t perform that action at this time.
0 commit comments