diff --git a/paddle/fluid/pybind/CMakeLists.txt b/paddle/fluid/pybind/CMakeLists.txt index a4d35f52a4e845979abb221300a89066820c5b2d..3b9b0a9ca6bca8db829cbf190dc81533d068b4bf 100755 --- a/paddle/fluid/pybind/CMakeLists.txt +++ b/paddle/fluid/pybind/CMakeLists.txt @@ -183,6 +183,7 @@ if(WITH_PYTHON) endif() set(PYBIND_SRCS ${PYBIND_SRCS} distributed_py.cc) endif() +set(PYBIND_DEPS ${PYBIND_DEPS} processgroup_comm_utils) if(WITH_ASCEND) set(PYBIND_DEPS ${PYBIND_DEPS} ascend_wrapper) diff --git a/paddle/fluid/pybind/distributed_py.cc b/paddle/fluid/pybind/distributed_py.cc index a4b53922a8e77568c0c6ad1efb5a30e294817041..2b9d8d1631b450a035a15e1fc144ef8a21b763bf 100644 --- a/paddle/fluid/pybind/distributed_py.cc +++ b/paddle/fluid/pybind/distributed_py.cc @@ -59,6 +59,8 @@ limitations under the License. */ #include "paddle/fluid/distributed/store/tcp_store.h" #endif +#include "paddle/phi/kernels/sync_batch_norm_kernel.h" + namespace py = pybind11; namespace paddle { @@ -90,6 +92,9 @@ using GlooOptions = paddle::distributed::ProcessGroupGloo::GlooOptions; static std::string GLOO_SOCKET_IFNAME_ENV = "GLOO_SOCKET_IFNAME"; // NOLINT +static UNUSED void *use_ccl_comm_func = + phi::detail::GetCCLComm(phi::CPUPlace()); + void BindDistributed(py::module *m) { py::enum_(*m, "ReduceOp") .value("SUM", distributed::ReduceOp::SUM)