Skip to content

Use std::variant to implement pytree Key #6701

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 5 commits into from
Nov 12, 2024

Conversation

swolchok
Copy link
Contributor

@swolchok swolchok commented Nov 7, 2024

Stack from ghstack (oldest at bottom):

Key was a struct that should've been a union; std::variant makes using a union much easier.

Differential Revision: D65575184

Key was a struct that should've been a union; std::variant makes using a union much easier.

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Nov 7, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6701

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit fc103c0 with merge base dc41596 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 7, 2024
swolchok added a commit that referenced this pull request Nov 7, 2024
Key was a struct that should've been a union; std::variant makes using a union much easier.

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

ghstack-source-id: 252232728
Pull Request resolved: #6701
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65575184

Key was a struct that should've been a union; std::variant makes using a union much easier.

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65575184

@swolchok swolchok requested review from digantdesai and dbort November 7, 2024 14:53
Key was a struct that should've been a union; std::variant makes using a union much easier.

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65575184

Key was a struct that should've been a union; std::variant makes using a union much easier.

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65575184

Key was a struct that should've been a union; std::variant makes using a union much easier.

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65575184

@facebook-github-bot facebook-github-bot merged commit 2bee62b into gh/swolchok/113/base Nov 12, 2024
41 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/swolchok/113/head branch November 12, 2024 20:07
swolchok added a commit that referenced this pull request Nov 12, 2024
Pull Request resolved: #6701

Key was a struct that should've been a union; std::variant makes using a union much easier.
ghstack-source-id: 253128071
@exported-using-ghexport

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

Co-authored-by: Scott Wolchok <[email protected]>
swolchok added a commit that referenced this pull request Nov 12, 2024
* Use std::variant to implement pytree Key

Pull Request resolved: #6701

Key was a struct that should've been a union; std::variant makes using a union much easier.
ghstack-source-id: 253128071
@exported-using-ghexport

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)

* Fix missing move and bare new in pytree from_str_internal

Just a couple minor fixes.

Differential Revision: [D65576543](https://our.internmc.facebook.com/intern/diff/D65576543/)

ghstack-source-id: 253128072
Pull Request resolved: #6783

---------

Co-authored-by: Scott Wolchok <[email protected]>
kedarnath03 pushed a commit to kedarnath03/executorch that referenced this pull request Jun 25, 2025
Pull Request resolved: pytorch/executorch#6701

Key was a struct that should've been a union; std::variant makes using a union much easier.
ghstack-source-id: 252630473
@exported-using-ghexport

Differential Revision: [D65575184](https://our.internmc.facebook.com/intern/diff/D65575184/)
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. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants