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 cfb9e16942c25f0397d00f17b0c3353a24b7acd8..7ccdb74a0f3f444aa7d67608f0d5c745def84ea6 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(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());