提交 23eca47f 编写于 作者: D Dong Daxiang 提交者: GitHub

Merge pull request #459 from barrierye/gil-realease

realease gil in Client predict
...@@ -83,7 +83,8 @@ PYBIND11_MODULE(serving_client, m) { ...@@ -83,7 +83,8 @@ PYBIND11_MODULE(serving_client, m) {
fetch_name, fetch_name,
predict_res, predict_res,
pid); pid);
}) },
py::call_guard<py::gil_scoped_release>())
.def("batch_predict", .def("batch_predict",
[](PredictorClient &self, [](PredictorClient &self,
const std::vector<std::vector<std::vector<float>>> const std::vector<std::vector<std::vector<float>>>
...@@ -102,7 +103,8 @@ PYBIND11_MODULE(serving_client, m) { ...@@ -102,7 +103,8 @@ PYBIND11_MODULE(serving_client, m) {
fetch_name, fetch_name,
predict_res_batch, predict_res_batch,
pid); pid);
}); },
py::call_guard<py::gil_scoped_release>());
} }
} // namespace general_model } // namespace general_model
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册