Skip to content

Commit f933e14

Browse files
committed
fix python gil problem
1 parent 7b1bb87 commit f933e14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/fluid/pybind/bind_fleet_executor.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ void BindFleetExecutor(py::module* m) {
3333
py::class_<FleetExecutor>(*m, "FleetExecutor")
3434
.def(py::init<const std::string&>())
3535
.def("init", &FleetExecutor::Init)
36-
.def("run", &FleetExecutor::Run);
36+
.def("run", &FleetExecutor::Run,
37+
py::call_guard<py::gil_scoped_release>());
3738

3839
py::class_<TaskNode>(*m, "TaskNode")
3940
.def(py::init<const framework::ProgramDesc&, int64_t, int64_t, int64_t>())

0 commit comments

Comments
 (0)