-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Revert "Revert D28833086: beef up at::_ops API" #60214
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
relanding this PR, but with a fix for windows cuda builds This reverts commit 6d0fb85. [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 902b609 (more details on the Dr. CI page and at hud.pytorch.org/pr/60214):
🕵️ 3 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
|
@bdhirsh has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_EXCEPT_WIN_CUDA` This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
|
@bdhirsh has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
update 1: I had to make a slightly new macro to handle update 2: looks like in the brief period of time that my original PR landed, some small binary size regressions were detected internally. Gotta figure out where that was coming from before I re-land this. Although inspecting the OSS libtorch_cpu.so showed that we were correctly adding two new symbols for each new op, |
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
|
Okay, issue (1) is harder to solve than I thought. My proposed fix (it's in the PR) For everything except Windows NVCC builds we do this: And for Windows NVCC builds we do this: I added a note with more details in The problem I'd like to write code like the following: But Windows NVCC apparently has a bug (in VS2017, fixed in VS2019) where it can't deal with The next reasonable alternative to try is this (we actually have some code that does this with an existing CONSTEXPR_EXCEPT_WIN_CUDA macro): The above fails thanks to the C++ standard (see https://developercommunity.visualstudio.com/t/static-constexpr-gives-member-may-not-be-initializ/444344). I tried out those two options and a few others in Compiler Explorer - see the examples with descriptions in https://godbolt.org/z/Tn73xdYGz. It would be great if we can suppress the original Windows NVCC compiler error, but I haven't figured out a way to do that. The alternative that I added at the top works fine, but accesses to |
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
|
@bdhirsh has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
|
This is fine, string access is guarded behind executed only once static calls anyway |
Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
|
@bdhirsh has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Reland of #59115, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
|
@bdhirsh has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Reland of #59115, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
|
@bdhirsh has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
Still waiting for some internal binary size tests to finish running, but after talking to @ezyang I moved some incriminating functions that I'd previously moved from There were a few functions that I'd moved into the header files before that I'm keeping in for now, like |
Reland of #59115, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
Pull Request resolved: #60214 Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_EXCEPT_WIN_CUDA` This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D29213932/)! ghstack-source-id: 132130129
Reland of #59115, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_CONST_EXCEPT_WIN_CUDA` (had to make a new macro that was a slight adjustment to an existing one) This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932) [ghstack-poisoned]
Pull Request resolved: #60214 Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_EXCEPT_WIN_CUDA` This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Differential Revision: [D29213932](https://our.internmc.facebook.com/intern/diff/D29213932/) **NOTE FOR REVIEWERS**: This PR has internal Facebook specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D29213932/)! ghstack-source-id: 132300710
Summary: Pull Request resolved: pytorch#60214 Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_EXCEPT_WIN_CUDA` This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: pytorch#40675 This reverts commit 6d0fb85. Test Plan: Imported from OSS Reviewed By: ezyang Differential Revision: D29213932 Pulled By: bdhirsh fbshipit-source-id: b90c7c10e5a51f8d6173ddca673b418e5774c248
Summary: Pull Request resolved: #60214 Relanding this PR, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871) This is identical to the original PR except for one change in `tools/codegen/gen.py`: `static constexpr` -> `static CONSTEXPR_EXCEPT_WIN_CUDA` This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675 This reverts commit 6d0fb85. Test Plan: Imported from OSS Reviewed By: ezyang Differential Revision: D29213932 Pulled By: bdhirsh fbshipit-source-id: b90c7c10e5a51f8d6173ddca673b418e5774c248
Reland of #59115, but with a fix for windows cuda builds (example failure in master here: https://github.com/pytorch/pytorch/runs/2852662871)
This is identical to the original PR except for one change in
tools/codegen/gen.py:static constexpr->static CONSTEXPR_CONST_EXCEPT_WIN_CUDA(had to make a new macro that was a slight adjustment to an existing one)This actually took a while to figure out, until I tracked down a previous pytorch PR that encountered a similar issue: #40675
This reverts commit 6d0fb85.
Stack from ghstack:
Differential Revision: D29213932