Skip to content

Commit ce5c26f

Browse files
LittleHeroZZZXEnigmatisms
authored andcommitted
release GIL in constant folding pass (PaddlePaddle#72561)
1 parent 151d9cd commit ce5c26f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

paddle/fluid/pybind/inference_api.cc

+3
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ void BindInferenceApi(py::module *m) {
592592
m->def("create_predictor",
593593
[](const paddle_infer::Config &config)
594594
-> std::unique_ptr<paddle_infer::Predictor> {
595+
#ifndef PADDLE_NO_PYTHON
596+
pybind11::gil_scoped_release release;
597+
#endif
595598
auto pred = std::make_unique<paddle_infer::Predictor>(config);
596599
return pred;
597600
});

0 commit comments

Comments
 (0)