未验证 提交 4ec72876 编写于 作者: W Wilber 提交者: GitHub

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

上级 e5a62493
......@@ -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());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册