-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Add stable parallel_for #161320
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
base: gh/mikaylagawarecki/337/base
Are you sure you want to change the base?
Add stable parallel_for #161320
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/161320
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 34bccd0 with merge base ac7b4e7 ( BROKEN TRUNK - The following job 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. |
[ghstack-poisoned]
Attention! PyTorch one of the C-stable API file was changedYou MUST NOT change existing function declarations in this, as this header defines a stable C ABI. If you need to change the signature for a function, introduce a new v2 version of the function and modify code generation to target the new version of the function. Caused by: |
[ghstack-poisoned]
return get_in_at_parallel(); | ||
} | ||
|
||
inline ParallelGuard(bool state) : previous_state_(is_enabled()) { |
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.
This can ctor can be remove an invocation of the reference getter by using std::exchange
return get_in_at_parallel(); | ||
} | ||
|
||
inline ParallelGuard(bool state) : previous_state_(is_enabled()) { |
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.
Previous_state_(std::exchange(get_in_at_parallel(), state)) {}
[ghstack-poisoned]
[ghstack-poisoned]
Stack from ghstack (oldest at bottom):