Skip to content

Conversation

@swolchok
Copy link
Contributor

@swolchok swolchok commented May 22, 2023

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 use optional<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

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]
@pytorch-bot
Copy link

pytorch-bot bot commented May 22, 2023

🔗 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 (image):

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]
swolchok added a commit that referenced this pull request May 22, 2023
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/)
@github-actions github-actions bot added the NNC label May 22, 2023
@pytorch-bot pytorch-bot bot added the release notes: distributed (c10d) release notes category label May 22, 2023
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Code change sounds fine, will let @malfet take the final look!

// Non-trivial destructor.
std::string>;

// This assert is also in Optional.cpp; including here too to make it
Copy link
Collaborator

Choose a reason for hiding this comment

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

cc @ezyang if you have more context about this

Copy link
Contributor

Choose a reason for hiding this comment

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

This is @swolchok's optimization, he knows ;)

@malfet malfet added the topic: bc breaking topic category label May 22, 2023
@albanD albanD added the module: bc-breaking Related to a BC-breaking change label May 22, 2023
Comment on lines -7 to -8
template<typename T>
class optional;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just say something like using optional = std::optional; and kill c10/util/Optional header?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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 :(

Copy link
Collaborator

Choose a reason for hiding this comment

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

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]
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR has internal changes and must be landed via Phabricator

Details for Dev Infra team Raised by workflow job

@malfet
Copy link
Contributor

malfet commented Nov 30, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@malfet
Copy link
Contributor

malfet commented Nov 30, 2023

@pytorchbot merge -f "Before rebase everything was green but executorch, see https://hud.pytorch.org/pytorch/pytorch/pull/101995?sha=18faa09012ed31baa8c37cce184dcbe36202d9ba "

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled. If you believe this is a mistake, then you can re trigger it through pytorch-bot.

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

malfet added a commit that referenced this pull request Nov 30, 2023
Should have been landed together with #101995
@malfet malfet mentioned this pull request Nov 30, 2023
@facebook-github-bot facebook-github-bot deleted the gh/swolchok/574/head branch December 3, 2023 15:27
@albanD albanD added oncall: distributed Add this issue/PR to distributed oncall triage queue and removed module: distributed labels Dec 8, 2023
dmenig pushed a commit to dmenig/pytorch that referenced this pull request Dec 21, 2023
liligwu pushed a commit to ROCm/FBGEMM that referenced this pull request Feb 16, 2024
pytorch#2138)

Summary:
X-link: pytorch/executorch#1226

Pull Request resolved: pytorch#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
michael-sandoval added a commit to michael-sandoval/pytorch that referenced this pull request Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: bc-breaking Related to a BC-breaking change module: cpu CPU specific problem (e.g., perf, algorithm) NNC oncall: distributed Add this issue/PR to distributed oncall triage queue release notes: distributed (c10d) release notes category release notes: quantization release notes category topic: bc breaking topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants