-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Add temporary torch::k{name} enum declarations #27051
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
Add temporary torch::k{name} enum declarations #27051
Conversation
|
@ShahriarSS Would you like to review this PR? Thanks! |
f01ee19 to
9fbbcb9
Compare
9fbbcb9 to
ccdc2c8
Compare
|
@yf225 The code looks good but what are we trying to achieve here? Why do we need this PR? |
|
@ShahriarSS Thanks for reviewing - the goal is that after this PR is merged, we can change all |
ezyang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Are you sure these constants will never conflict with other constants we may want to expose in torch? I guess the risk is low.
|
@ezyang Yes I think the risk of constants conflict should be low for the |
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yf225 is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary:
This PR adds temporary declarations for `torch::k{name}` enums, so that we can submit a PR to rename the enum usage in torchvision. And then, after the changes to torchvision is done, we can remove the temporary declarations in pytorch#26837 to officially move over to using `c10::variant` for enums.
Pull Request resolved: pytorch#27051
Differential Revision: D17672220
Pulled By: yf225
fbshipit-source-id: 4ae77634e8c7efa3404698f7c1a69177cbb5dab3
Summary:
This PR adds temporary declarations for `torch::k{name}` enums, so that we can submit a PR to rename the enum usage in torchvision. And then, after the changes to torchvision is done, we can remove the temporary declarations in pytorch#26837 to officially move over to using `c10::variant` for enums.
Pull Request resolved: pytorch#27051
Differential Revision: D17672220
Pulled By: yf225
fbshipit-source-id: 4ae77634e8c7efa3404698f7c1a69177cbb5dab3
This PR adds temporary declarations for
torch::k{name}enums, so that we can submit a PR to rename the enum usage in torchvision. And then, after the changes to torchvision is done, we can remove the temporary declarations in #26837 to officially move over to usingc10::variantfor enums.