fix compile when with_nccl=off. test=develop (#24444)

release/2.0-alpha
Wilber 5 years ago committed by GitHub
parent e5a624935f
commit 4ec7287602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -91,3 +91,4 @@ endfunction()
external_lite_static_libs(lite_full_static ${LITE_BINARY_DIR}/inference_lite_lib/cxx/lib/libpaddle_full_api_shared.so)
add_definitions(-DPADDLE_WITH_LITE)
add_definitions(-DLITE_WITH_LOG)

@ -186,7 +186,7 @@ void SyncBatchNormFunctor(const framework::ExecutionContext &ctx,
auto gplace = BOOST_GET_CONST(platform::CUDAPlace, ctx.GetPlace());
memory::Copy(platform::CPUPlace(), c_g_st_d, gplace, stats, bytes, 0);
#ifndef WIN32
#ifdef PADDLE_WITH_NCCL
auto *comm = dev_ctx.nccl_comm();
if (comm) {
int dtype = platform::ToNCCLDataType(mean_out->type());
@ -460,7 +460,7 @@ void SyncBatchNormGradFunctor(
dy_d, x_d, saved_mean, N, fsize, C, stats);
}
#ifndef WIN32
#ifdef PADDLE_WITH_NCCL
auto *comm = dev_ctx.nccl_comm();
if (comm) {
int dtype = platform::ToNCCLDataType(scale->type());

Loading…
Cancel
Save