From c7cb7eecdd6bd4514901f6e92df10b6dee1db896 Mon Sep 17 00:00:00 2001 From: Yuang Liu Date: Tue, 7 Dec 2021 08:45:53 +0800 Subject: [PATCH] [fleet_executor] fix python gil problem (#37882) --- paddle/fluid/pybind/bind_fleet_executor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/pybind/bind_fleet_executor.cc b/paddle/fluid/pybind/bind_fleet_executor.cc index 40d325fae45..6fc9b2a494f 100644 --- a/paddle/fluid/pybind/bind_fleet_executor.cc +++ b/paddle/fluid/pybind/bind_fleet_executor.cc @@ -33,7 +33,8 @@ void BindFleetExecutor(py::module* m) { py::class_(*m, "FleetExecutor") .def(py::init()) .def("init", &FleetExecutor::Init) - .def("run", &FleetExecutor::Run); + .def("run", &FleetExecutor::Run, + py::call_guard()); py::class_(*m, "TaskNode") .def(py::init()) -- GitLab