Skip to content

Make serial parallel_for "polyfill" iterate backwards in debug builds #9044

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

Merged
merged 52 commits into from
Mar 11, 2025

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Mar 7, 2025

Catches users who assume it goes forwards in order (like my attempt to use parallel_for in reductions, whoops).

swolchok added 30 commits March 4, 2025 11:35
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Copy link
Contributor

@JacobSzwejbka JacobSzwejbka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug loop looks fine to me, though do we have much other NDEBUG ifdefs in the codebase? Is that a mode people often use with ET?

@swolchok
Copy link
Contributor Author

Is that a mode people often use with ET?

Release builds define NDEBUG. it's the same macro that gates assert.

Base automatically changed from gh/swolchok/315/head to main March 11, 2025 18:14
[ghstack-poisoned]
swolchok added a commit that referenced this pull request Mar 11, 2025
Catches users who assume it goes forwards in order (like my attempt to use parallel_for in reductions, whoops).

ghstack-source-id: 4fa2978
ghstack-comment-id: 2707052203
Pull Request resolved: #9044
@swolchok swolchok merged commit 8f7bc8d into main Mar 11, 2025
17 of 19 checks passed
@swolchok swolchok deleted the gh/swolchok/324/head branch March 11, 2025 18:24
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

swolchok added a commit that referenced this pull request Mar 12, 2025
This reverts commit 05a160e.

Revert "Revert "Make serial parallel_for "polyfill" iterate backwards in debug builds (#9044)""

This reverts commit 815eaff.

Revert "Revert "Unbreak optimized kernels buck build (and check it in unittest-buck) (#9159)""

This reverts commit 10bb615.

ghstack-source-id: 2c4a363ff685022b388319f6565b74286fbf783a
ghstack-comment-id: 2718584686
Pull Request resolved: #9190
SS-JIA pushed a commit that referenced this pull request Mar 12, 2025
swolchok added a commit that referenced this pull request Mar 12, 2025
This reverts commit 05a160e.

Revert "Revert "Make serial parallel_for "polyfill" iterate backwards in debug builds (#9044)""

This reverts commit 815eaff.

Revert "Revert "Unbreak optimized kernels buck build (and check it in unittest-buck) (#9159)""

This reverts commit 10bb615.

ghstack-source-id: 2c4a363
ghstack-comment-id: 2718584686
Pull Request resolved: #9190
swolchok added a commit that referenced this pull request Mar 12, 2025
This reverts commit 05a160e.

Revert "Revert "Make serial parallel_for "polyfill" iterate backwards in debug builds (#9044)""

This reverts commit 815eaff.

Revert "Revert "Unbreak optimized kernels buck build (and check it in unittest-buck) (#9159)""

This reverts commit 10bb615.

ghstack-source-id: 2c4a363
ghstack-comment-id: 2718584686
Pull Request resolved: #9190
swolchok added a commit that referenced this pull request Mar 12, 2025
This reverts commit 05a160e.

Revert "Revert "Make serial parallel_for "polyfill" iterate backwards in
debug builds (#9044)""

This reverts commit 815eaff.

Revert "Revert "Unbreak optimized kernels buck build (and check it in
unittest-buck) (#9159)""

This reverts commit 10bb615.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants