-
Notifications
You must be signed in to change notification settings - Fork 690
Use NoThreadPoolGuard in executor_runner if -cpu_threads is set to 1 #15264
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
Conversation
Stack from ghstack (oldest at bottom): |
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15264
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 3 Unrelated FailuresAs of commit 8b2afb1 with merge base 2e8e579 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
std::optional<::executorch::extension::threadpool::NoThreadPoolGuard> | ||
opt_guard; | ||
if (cpu_threads == 1) { | ||
opt_guard.emplace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this, does the perf look same as ET_USE_THREADPOOL
not defined? Curious if there is anything else...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't look the same, because we still wrap the function in a runtime::FunctionRef so there's an extra layer of function call.
unittest-arm-backend-with-no-fvp and unittest-nxp-neutron both flaky/broken since at least Friday, merging |
Doing so removes some overhead and is what I think we should recommend to customers.