Add support for sessions to share a global threadpool.#3177
Merged
pranavsharma merged 11 commits intomasterfrom Mar 18, 2020
Merged
Add support for sessions to share a global threadpool.#3177pranavsharma merged 11 commits intomasterfrom
pranavsharma merged 11 commits intomasterfrom
Conversation
pranavsharma
commented
Mar 11, 2020
pranavsharma
commented
Mar 11, 2020
pranavsharma
commented
Mar 11, 2020
yuslepukhin
reviewed
Mar 13, 2020
yuslepukhin
reviewed
Mar 13, 2020
yuslepukhin
reviewed
Mar 13, 2020
yuslepukhin
reviewed
Mar 13, 2020
Member
Contributor
Author
|
This is ready for review. Debugging the Android CI failure meanwhile.... |
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
Contributor
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
skottmckay
reviewed
Mar 17, 2020
Contributor
Author
|
Most of the test_inference/test_environment code is from before including the one that has the cryptic comment :-). |
Contributor
Author
It looks like all tests exes are run inside the android emulator and hence even the global threadpools test exe shares the same env that was created before which explains the test failure. I don't know much about the emulator, so for now I'll disable these tests for android. |
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.
Description: Add support for sessions to share a global threadpool.
Motivation and Context
The OCR team has a requirement to run multiple sessions (models) in a process. ORT creates an intra and inter thread pool for every session. This is clearly not efficient in this scenario. Hence, we need to design a way to have these 2 thread pools be shared between multiple sessions.
After discussion with the OCR team, option #3 in this design doc seems to be the simplest. They don't have any requirement for this feature to be available in language bindings other than C/C++.
Usage will be as follows. Also see documentation under docs/C_API.md.
Also moved the logger to the Environment class as part of this change to facilitate easier passing of global threadpools to session. We wanted to do this any way.