Add temporary torch::k{name} enum declarations#27051
Add temporary torch::k{name} enum declarations#27051yf225 wants to merge 2 commits intopytorch:masterfrom
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.
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.
@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.