Pybind11 free threading - #3158
Merged
Merged
Conversation
Some stuff wasn't actually thread safe: - Made the jitter RNG thread_local in tools/python/src/numpy_returns.cpp:97. - Serialized concurrent inference on the same face-recognition or CNN detector instance in tools/python/src/face_recognition.cpp:72 and tools/python/src/ cnn_face_detector.cpp:52. I also pulled the official pybind11 release. What was here looks like one of their alpha snapshots. We should use an official pybind11 release In particular, I replaced the mixed development pybind11 snapshot with exact upstream pybind11 v3.0.4, commit d03662f0984f652b60e7ddce53d3868002275197. Also added provenance/update instructions in dlib/external/pybind11/README.dlib. Then some other minor related cleanup
Owner
Author
|
All the tests are passing now @yokomichikt. You want to try this out in your setup before I land it? I'm pretty sure it works but you want to give it a test drive first? :D |
Contributor
|
I've verified pybind11-free-threading branch and it works very well. Thanks for quick response. |
Owner
Author
|
No problem. Thanks for the PR :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates to pybind11 v3.0.4 and declares that the gil doesn't need to be locked when python calls into dlib.
This is a copy of #3155 but with some issues fixed
Some stuff wasn't actually thread safe:
I also pulled the official pybind11 release. What was here looks like one of their alpha snapshots. We should use an official pybind11 release
In particular, I replaced the mixed development pybind11 snapshot with exact upstream pybind11 v3.0.4, commit d03662f0984f652b60e7ddce53d3868002275197. Also added provenance/update instructions in dlib/external/pybind11/README.dlib.
Then some other minor related cleanup