Skip to content

Commit 7aa5f65

Browse files
release GIL in constant folding pass
1 parent 7a7f5cb commit 7aa5f65

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)