Skip to content

Commit 07a65aa

Browse files
authored
cherry-pick. test=develop test=release/1.8 (#25156)
1 parent dd85805 commit 07a65aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cmake/external/lite.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,4 @@ endfunction()
9191
external_lite_static_libs(lite_full_static ${LITE_BINARY_DIR}/inference_lite_lib/cxx/lib/libpaddle_full_api_shared.so)
9292

9393
add_definitions(-DPADDLE_WITH_LITE)
94+
add_definitions(-DLITE_WITH_LOG)

paddle/fluid/operators/sync_batch_norm_op.cu.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void SyncBatchNormFunctor(const framework::ExecutionContext &ctx,
186186
auto gplace = boost::get<platform::CUDAPlace>(ctx.GetPlace());
187187
memory::Copy(platform::CPUPlace(), c_g_st_d, gplace, stats, bytes, 0);
188188

189-
#ifndef WIN32
189+
#ifdef PADDLE_WITH_NCCL
190190
auto *comm = dev_ctx.nccl_comm();
191191
if (comm) {
192192
int dtype = platform::ToNCCLDataType(mean_out->type());
@@ -460,7 +460,7 @@ void SyncBatchNormGradFunctor(
460460
dy_d, x_d, saved_mean, N, fsize, C, stats);
461461
}
462462

463-
#ifndef WIN32
463+
#ifdef PADDLE_WITH_NCCL
464464
auto *comm = dev_ctx.nccl_comm();
465465
if (comm) {
466466
int dtype = platform::ToNCCLDataType(scale->type());

0 commit comments

Comments
 (0)