From f933e145d4ccc4bb3db13b7f42b9a839cba93a85 Mon Sep 17 00:00:00 2001 From: liuyuang Date: Mon, 6 Dec 2021 16:41:45 +0800 Subject: [PATCH] fix python gil problem --- 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 40d325fae458f..6fc9b2a494f61 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())