-
Notifications
You must be signed in to change notification settings - Fork 25k
Remove confusing torch::jit::RegisterOperators for custom ops #28229
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
Conversation
We have `torch::RegisterOperators` for custom ops. `torch::jit::RegisterOperators` had a dual state of being able to register custom ops if called one way and being able to register pure JIT ops if called another way. This is confusing because you end up in different operator libraries depending on which API exactly you're using. This PR removes the ability for torch::jit::RegisterOperators to register custom ops and forces people to use the new torch::RegisterOperators. This was already deprecated before but we now remove it. Differential Revision: [D17981895](https://our.internmc.facebook.com/intern/diff/D17981895/) [ghstack-poisoned]
We have `torch::RegisterOperators` for custom ops. `torch::jit::RegisterOperators` had a dual state of being able to register custom ops if called one way and being able to register pure JIT ops if called another way. This is confusing because you end up in different operator libraries depending on which API exactly you're using. This PR removes the ability for torch::jit::RegisterOperators to register custom ops and forces people to use the new torch::RegisterOperators. This was already deprecated before but we now remove it. Differential Revision: [D17981895](https://our.internmc.facebook.com/intern/diff/D17981895/) ghstack-source-id: 92106839 Pull Request resolved: #28229
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.
There are a few places still using it:
https://github.com/pytorch/pytorch/blob/319ef3b/test/onnx/test_custom_ops.py#L22-L23
https://github.com/pytorch/pytorch/blob/319ef3b/test/test_cpp_extensions.py#L580
https://github.com/pytorch/glow/blob/1656b9a/torch_glow/src/PyTorchCommon.cpp#L54
https://github.com/pytorch/glow/blob/1656b9a/torch_glow/src/PyTorchCommon.cpp#L156
https://github.com/pytorch/glow/blob/1656b9a/torch_glow/src/PyTorchFileLoader.cpp#L106
…ops" We have `torch::RegisterOperators` for custom ops. `torch::jit::RegisterOperators` had a dual state of being able to register custom ops if called one way and being able to register pure JIT ops if called another way. This is confusing because you end up in different operator libraries depending on which API exactly you're using. This PR removes the ability for torch::jit::RegisterOperators to register custom ops and forces people to use the new torch::RegisterOperators. This was already deprecated before but we now remove it. Differential Revision: [D17981895](https://our.internmc.facebook.com/intern/diff/D17981895/) [ghstack-poisoned]
…ops" We have `torch::RegisterOperators` for custom ops. `torch::jit::RegisterOperators` had a dual state of being able to register custom ops if called one way and being able to register pure JIT ops if called another way. This is confusing because you end up in different operator libraries depending on which API exactly you're using. This PR removes the ability for torch::jit::RegisterOperators to register custom ops and forces people to use the new torch::RegisterOperators. This was already deprecated before but we now remove it. Differential Revision: [D17981895](https://our.internmc.facebook.com/intern/diff/D17981895/) [ghstack-poisoned]
Pull Request resolved: #28229 We have `torch::RegisterOperators` for custom ops. `torch::jit::RegisterOperators` had a dual state of being able to register custom ops if called one way and being able to register pure JIT ops if called another way. This is confusing because you end up in different operator libraries depending on which API exactly you're using. This PR removes the ability for torch::jit::RegisterOperators to register custom ops and forces people to use the new torch::RegisterOperators. This was already deprecated before but we now remove it. ghstack-source-id: 92137305 Differential Revision: [D17981895](https://our.internmc.facebook.com/intern/diff/D17981895/)
This pull request has been merged in 2432986. |
…h#28229) Summary: Pull Request resolved: pytorch#28229 We have `torch::RegisterOperators` for custom ops. `torch::jit::RegisterOperators` had a dual state of being able to register custom ops if called one way and being able to register pure JIT ops if called another way. This is confusing because you end up in different operator libraries depending on which API exactly you're using. This PR removes the ability for torch::jit::RegisterOperators to register custom ops and forces people to use the new torch::RegisterOperators. This was already deprecated before but we now remove it. ghstack-source-id: 92137305 Test Plan: unit tests Differential Revision: D17981895 fbshipit-source-id: 0af267dfdc3c6a2736740091cf841bac40deff40
Stack from ghstack:
We have
torch::RegisterOperators
for custom ops.torch::jit::RegisterOperators
had a dual state of being able to register custom ops if called one way and being able to register pure JIT ops if called another way.This is confusing because you end up in different operator libraries depending on which API exactly you're using.
This PR removes the ability for torch::jit::RegisterOperators to register custom ops and forces people to use the new torch::RegisterOperators.
This was already deprecated before but we now remove it.
Differential Revision: D17981895