-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Runtime][ThreadPool]Refactor affinity function and support CPU affinity list setting. #9802
Merged
Commits on Jan 7, 2022
-
[Runtime][ThreadPool] Refactor affinity function and support CPU affi…
…nity list setting. Issue: 1. There are multiple affinity function using "LINUX" and "ANDROID" macro check and the multiple check make the logic maintain and change become complex. 2. Current logic of tvm [Runtime][ThreadPool] assume all of the cpu resources are available for a single backend runtime to do the data flow computation. But such assumption may not true when user running multiple task on the system and not want tvm task exhaust all of the cpu resource, or when user going to run multiple backend runtime of tvm on the system, each backend runtime of tvm should use different cpu affinity settings to achieve best performance. Solution: 1.Refactor the affinity functions to move the "LINUX" and "ANDROID" check into one function. 2.In this solution, we introduce a new "CPU AffinityMode type" named "kSpecify", by using "kSpecify" and the function named "tvm::runtime::threading ::Configure" user can specify the cpu list for the cpu affinity of a backend runtime. This solution reused the existing per thread thread pool logic of [Runtime][Threadpool] that created a worker thread pool for current thread which can running a particular runtime. for a multiple runtime use case, user can first launch multiple threads, then call "tvm::runtime::threading ::Configure" with cpu list to create tvm data flow worker thread pool, after doing this the execution of the multiple runtime on the multiple threads will use different cpu resource list.
Configuration menu - View commit details
-
Copy full SHA for a01df59 - Browse repository at this point
Copy the full SHA a01df59View commit details -
hua jiang committed
Jan 7, 2022 Configuration menu - View commit details
-
Copy full SHA for 1b457e9 - Browse repository at this point
Copy the full SHA 1b457e9View commit details -
hua jiang committed
Jan 7, 2022 Configuration menu - View commit details
-
Copy full SHA for 0c8d189 - Browse repository at this point
Copy the full SHA 0c8d189View commit details -
hua jiang committed
Jan 7, 2022 Configuration menu - View commit details
-
Copy full SHA for d8ec871 - Browse repository at this point
Copy the full SHA d8ec871View commit details -
hua jiang committed
Jan 7, 2022 Configuration menu - View commit details
-
Copy full SHA for 7922d6e - Browse repository at this point
Copy the full SHA 7922d6eView commit details -
hua jiang committed
Jan 7, 2022 Configuration menu - View commit details
-
Copy full SHA for b3cdd2a - Browse repository at this point
Copy the full SHA b3cdd2aView commit details
Commits on Feb 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 937aa77 - Browse repository at this point
Copy the full SHA 937aa77View commit details
Commits on Feb 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ada242c - Browse repository at this point
Copy the full SHA ada242cView commit details
Commits on Feb 24, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 13fe147 - Browse repository at this point
Copy the full SHA 13fe147View commit details
Commits on Feb 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 770fc92 - Browse repository at this point
Copy the full SHA 770fc92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7ea0c2e - Browse repository at this point
Copy the full SHA 7ea0c2eView commit details
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.