diff --git a/cmake/external/lite.cmake b/cmake/external/lite.cmake index 323a8ddc729f846217f6ea6ba1c05cc5a2d777d5..70c11d37f911da9225a8609de756438c9b74c596 100644 --- a/cmake/external/lite.cmake +++ b/cmake/external/lite.cmake @@ -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) diff --git a/paddle/fluid/operators/sync_batch_norm_op.cu.h b/paddle/fluid/operators/sync_batch_norm_op.cu.h index f3d579f3f8689b41f364f281e7e8270bb354b983..d52eaecb94c12defbcf1d850a16747236611e8f4 100644 --- a/paddle/fluid/operators/sync_batch_norm_op.cu.h +++ b/paddle/fluid/operators/sync_batch_norm_op.cu.h @@ -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());