Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoped GIL release in run_with_iobinding #11248

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

yuslepukhin
Copy link
Member

Description:
Temporarily release GIL lock in pybind run_with_io_binding to allow concurrent runs.

Motivation and Context
Perf bug. Should be done like other runs.

Fixes: #11246

@@ -1547,6 +1547,8 @@ including arg name, arg type (contains both type and shape).)pbdoc")
py::return_value_policy::reference_internal)
.def("run_with_iobinding", [](PyInferenceSession* sess, SessionIOBinding& io_binding, RunOptions* run_options = nullptr) -> void {
Status status;
// release GIL to allow multiple python threads to invoke Run() in parallel.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the comment still read Run() ?

@yuslepukhin yuslepukhin merged commit 98faaa7 into master Apr 18, 2022
@yuslepukhin yuslepukhin deleted the yuslepukhin/release_gil_iobinding branch April 18, 2022 20:07
chilo-ms added a commit that referenced this pull request Apr 19, 2022
* Update tools/ci_build/upload_python_package_to_azure_storage.py to not use the azure blob storage python package (#11114)

* Fix the rocm packaging pipeline package upload problem (#11174)

In #11114 , I changed the script to use azcopy instead of azure blob storage's python APIs. However, it doesn't work for the AMD rocm pipeline, because:

1. The machines do not have azcopy installed
2. The machines are not in Azure, so they don't have Azure managed identity. So they still need to use SAS.

Therefore in this PR I get the old python file back, but only use it in the AMD pipeline.

* Scoped GIL release in run_with_iobinding (#11248)

* [js/web] disable test_tan temorarily (#11048)

* [js/web] fix output type mapping (#11049)

Co-authored-by: Changming Sun <chasun@microsoft.com>
Co-authored-by: Dmitri Smirnov <yuslepukhin@users.noreply.github.com>
Co-authored-by: Yulong Wang <7679871+fs-eire@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IOBinding doesn't release the Python GIL
3 participants