[PyTorch] Redirect c10::optional to std::optional#101995
[PyTorch] Redirect c10::optional to std::optional#101995swolchok wants to merge 35 commits intogh/swolchok/574/basefrom
Conversation
We have C++17 now! I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/101995
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 ac98e66 with merge base 597d3fb ( 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. |
We have C++17 now! I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) [ghstack-poisoned]
Pull Request resolved: #101995 We have C++17 now! I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway. ghstack-source-id: 189899247 Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/)
| // Non-trivial destructor. | ||
| std::string>; | ||
|
|
||
| // This assert is also in Optional.cpp; including here too to make it |
| template<typename T> | ||
| class optional; |
There was a problem hiding this comment.
Should we just say something like using optional = std::optional; and kill c10/util/Optional header?
There was a problem hiding this comment.
that'd be fine with me, but I've had to leave in #include <c10/macros/Macros.h> in c10/util/Optional.h for now because lots of files seem to depend on pulling in the Macros.h namespace shenanigans through Optional.h :(
There was a problem hiding this comment.
Agre with @malfet . This is how llvm handled their std::optional conversion.
We have C++17 now! I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) cc ezyang gchanan EikanWang jgong5 [ghstack-poisoned]
We have C++17 now! I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) cc ezyang gchanan EikanWang jgong5 [ghstack-poisoned]
…d::optional doesn't pass them on "[PyTorch] Redirect c10::optional to std::optional" We have C++17 now! I am intentionally dropping the c10::optional<c10::ArrayRef> size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use optional<ArrayRef> in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) cc ezyang gchanan EikanWang jgong5 [ghstack-poisoned]
pytorch#2138) Summary: X-link: pytorch/executorch#1226 Landing non-PyTorch portions first; then the PyTorch portions of pytorch/pytorch#101995 will land to Github. Reviewed By: malfet Differential Revision: D51355841
pytorch#1226) Summary: X-link: pytorch/FBGEMM#2138 Landing non-PyTorch portions first; then the PyTorch portions of pytorch/pytorch#101995 will land to Github. Reviewed By: malfet Differential Revision: D51355841
pytorch#2138) Summary: X-link: pytorch/executorch#1226 Landing non-PyTorch portions first; then the PyTorch portions of pytorch/pytorch#101995 will land to Github. Reviewed By: malfet Differential Revision: D51355841
pytorch#1226) Summary: X-link: pytorch/FBGEMM#2138 Landing non-PyTorch portions first; then the PyTorch portions of pytorch/pytorch#101995 will land to Github. Reviewed By: malfet Differential Revision: D51355841
#1226) Summary: Pull Request resolved: #1226 X-link: pytorch/FBGEMM#2138 Landing non-PyTorch portions first; then the PyTorch portions of pytorch/pytorch#101995 will land to Github. Reviewed By: malfet Differential Revision: D51355841 fbshipit-source-id: 4eed885733189f21e342613431b637de72979cb4
We have C++17 now! I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang [ghstack-poisoned]
We have C++17 now! I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang H-Huang awgu kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l [ghstack-poisoned]
|
looks like we're just waiting for the next executorch pinned commit bump |
|
The test failure may be unrelated and can be ignored. |
it's definitely related. pytorch/executorch@61aad49 used to be part of this PR but I had to split it out, and we need it pulled in so that this PR won't break the build. #114717 will update us. |
|
@pytorchbot rebase -b main |
|
Considering that all other tests were green, we just need to wait for executorch tests to pass to merge this |
|
@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here |
We have C++17 now! I am intentionally dropping the `c10::optional<c10::ArrayRef>` size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't use `optional<ArrayRef>` in function arguments anymore anyway. Differential Revision: [D46079028](https://our.internmc.facebook.com/intern/diff/D46079028/) cc ezyang gchanan jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 EikanWang H-Huang awgu kwen2501 wanchaol fegin fduwjj wz337 wconstab mrshenli zhaojuanmao rohan-varma kiukchung d4l3k lucasllc XilunWu tianyu-l [ghstack-poisoned]
|
Successfully rebased |
|
@pytorchbot merge |
Merge failedReason: This PR has internal changes and must be landed via Phabricator Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge failedReason: This PR has internal changes and must be landed via Phabricator Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot merge -f "Before rebase everything was green but executorch, see https://hud.pytorch.org/pytorch/pytorch/pull/101995?sha=18faa09012ed31baa8c37cce184dcbe36202d9ba " |
|
The merge job was canceled. If you believe this is a mistake, then you can re trigger it through pytorch-bot. |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
We have C++17 now!
I am intentionally dropping the
c10::optional<c10::ArrayRef>size optimization. It was intended to improve dispatch, but thanks to D34602980 / #70864 we don't useoptional<ArrayRef>in function arguments anymore anyway.Differential Revision: D46079028
cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @ezyang @gchanan @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @EikanWang @kiukchung @d4l3k @LucasLLC