diff --git a/paddle/fluid/framework/ir/sync_batch_norm_pass.cc b/paddle/fluid/framework/ir/sync_batch_norm_pass.cc index 90c1b23fe4f61eb8b6a70f7a6ab7de89754fb102..222c73761b4f5d960b1efafdb2e4368c17519fec 100644 --- a/paddle/fluid/framework/ir/sync_batch_norm_pass.cc +++ b/paddle/fluid/framework/ir/sync_batch_norm_pass.cc @@ -24,6 +24,10 @@ namespace ir { class SyncBatchNormPass : public Pass { protected: void ApplyImpl(ir::Graph *graph) const override { +#if defined(_WIN32) + VLOG(3) << "Not use synchronize batch norm on windows"; + return; +#endif VLOG(3) << "Use synchronize batch norm"; for (const Node *n : graph->Nodes()) { if (n->IsOp() && n->Op()) { diff --git a/paddle/fluid/operators/CMakeLists.txt b/paddle/fluid/operators/CMakeLists.txt index ea0c0b82be40ed488d7d649abb1706b3cbc794f2..f59e73d142a4ecea2d4e2208d649c3eeca852960 100644 --- a/paddle/fluid/operators/CMakeLists.txt +++ b/paddle/fluid/operators/CMakeLists.txt @@ -68,12 +68,8 @@ if (WITH_GPU) else() op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale) endif() - if (NOT WIN32) - if (WITH_NCCL) - op_library(sync_batch_norm_op) - file(APPEND ${pybind_file} "USE_CUDA_ONLY_OP(sync_batch_norm);\n") - endif() - endif() + op_library(sync_batch_norm_op) + file(APPEND ${pybind_file} "USE_CUDA_ONLY_OP(sync_batch_norm);\n") else() op_library(warpctc_op DEPS dynload_warpctc sequence_padding sequence_scale) endif()