-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[ONNX] Expose OnnxRegistry publicly #106140
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
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/106140
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 3 PendingAs of commit e5fd932: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
The official move of `OnnxRegistry` to `torch.onnx` allows it to become one of the parameters in `torch.onnx.ExportOption`. By incorporating `OnnxRegistry` in `torch.onnx.ExportOption`, users gain access to various functionalities, including the ability to register custom operators using `register_custom_op`, check whether an operator is supported using `is_registered_op`, and obtain symbolic functions that support specific operators using `get_functions`. Additionally, `opset_version` is now exclusively available in `torch.onnx.OnnxRegistry` as it is removed from `torch.onnx.ExportOption`. The initialization of the registry with torchlib under the provided opset version ensures that the exporter uses the specified opset version as the primary version for exporting. These changes encompass scenarios where users can: 1. Register an unsupported ATen operator with a custom implementation using onnx-script. 2. Override an existing symbolic function (onnx invariant). [ghstack-poisoned]
The official move of `OnnxRegistry` to `torch.onnx` allows it to become one of the parameters in `torch.onnx.ExportOption`. By incorporating `OnnxRegistry` in `torch.onnx.ExportOption`, users gain access to various functionalities, including the ability to register custom operators using `register_custom_op`, check whether an operator is supported using `is_registered_op`, and obtain symbolic functions that support specific operators using `get_functions`. Additionally, `opset_version` is now exclusively available in `torch.onnx.OnnxRegistry` as it is removed from `torch.onnx.ExportOption`. The initialization of the registry with torchlib under the provided opset version ensures that the exporter uses the specified opset version as the primary version for exporting. These changes encompass scenarios where users can: 1. Register an unsupported ATen operator with a custom implementation using onnx-script. 2. Override an existing symbolic function (onnx invariant). NOTE: The custom registered function will be prioritized in onnx dispatcher, and if there are multiple custom ones, the one registered the last will be picked. [ghstack-poisoned]
The official move of `OnnxRegistry` to `torch.onnx` allows it to become one of the parameters in `torch.onnx.ExportOption`. By incorporating `OnnxRegistry` in `torch.onnx.ExportOption`, users gain access to various functionalities, including the ability to register custom operators using `register_custom_op`, check whether an operator is supported using `is_registered_op`, and obtain symbolic functions that support specific operators using `get_functions`. Additionally, `opset_version` is now exclusively available in `torch.onnx.OnnxRegistry` as it is removed from `torch.onnx.ExportOption`. The initialization of the registry with torchlib under the provided opset version ensures that the exporter uses the specified opset version as the primary version for exporting. These changes encompass scenarios where users can: 1. Register an unsupported ATen operator with a custom implementation using onnx-script. 2. Override an existing symbolic function (onnx invariant). NOTE: The custom registered function will be prioritized in onnx dispatcher, and if there are multiple custom ones, the one registered the last will be picked. [ghstack-poisoned]
The official move of `OnnxRegistry` to `torch.onnx` allows it to become one of the parameters in `torch.onnx.ExportOption`. By incorporating `OnnxRegistry` in `torch.onnx.ExportOption`, users gain access to various functionalities, including the ability to register custom operators using `register_custom_op`, check whether an operator is supported using `is_registered_op`, and obtain symbolic functions that support specific operators using `get_functions`. Additionally, `opset_version` is now exclusively available in `torch.onnx.OnnxRegistry` as it is removed from `torch.onnx.ExportOption`. The initialization of the registry with torchlib under the provided opset version ensures that the exporter uses the specified opset version as the primary version for exporting. These changes encompass scenarios where users can: 1. Register an unsupported ATen operator with a custom implementation using onnx-script. 2. Override an existing symbolic function (onnx invariant). NOTE: The custom registered function will be prioritized in onnx dispatcher, and if there are multiple custom ones, the one registered the last will be picked. [ghstack-poisoned]
The official move of `OnnxRegistry` to `torch.onnx` allows it to become one of the parameters in `torch.onnx.ExportOption`. By incorporating `OnnxRegistry` in `torch.onnx.ExportOption`, users gain access to various functionalities, including the ability to register custom operators using `register_custom_op`, check whether an operator is supported using `is_registered_op`, and obtain symbolic functions that support specific operators using `get_functions`. Additionally, `opset_version` is now exclusively available in `torch.onnx.OnnxRegistry` as it is removed from `torch.onnx.ExportOption`. The initialization of the registry with torchlib under the provided opset version ensures that the exporter uses the specified opset version as the primary version for exporting. These changes encompass scenarios where users can: 1. Register an unsupported ATen operator with a custom implementation using onnx-script. 2. Override an existing symbolic function (onnx invariant). NOTE: The custom registered function will be prioritized in onnx dispatcher, and if there are multiple custom ones, the one registered the last will be picked. [ghstack-poisoned]
I will have another PR to address, if there is any, other comments. |
@pytorchbot merge |
Merge startedYour 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 |
Update the usage of torch.onnx.OnnxRegistry, as it's officially published in PyTorch: pytorch/pytorch#106140. --------- Co-authored-by: Wei-Sheng Chin <[email protected]>
Update the usage of torch.onnx.OnnxRegistry, as it's officially published in PyTorch: pytorch/pytorch#106140. --------- Co-authored-by: Wei-Sheng Chin <[email protected]>
The official move of `OnnxRegistry` to `torch.onnx` allows it to become one of the parameters in `torch.onnx.ExportOption`. By incorporating `OnnxRegistry` in `torch.onnx.ExportOption`, users gain access to various functionalities, including the ability to register custom operators using `register_custom_op`, check whether an operator is supported using `is_registered_op`, and obtain symbolic functions that support specific operators using `get_functions`. Additionally, `opset_version` is now exclusively available in `torch.onnx.OnnxRegistry` as it is removed from `torch.onnx.ExportOption`. The initialization of the registry with torchlib under the provided opset version ensures that the exporter uses the specified opset version as the primary version for exporting. These changes encompass scenarios where users can: 1. Register an unsupported ATen operator with a custom implementation using onnx-script. 2. Override an existing symbolic function (onnx invariant). NOTE: The custom registered function will be prioritized in onnx dispatcher, and if there are multiple custom ones, the one registered the last will be picked. Pull Request resolved: pytorch#106140 Approved by: https://github.com/justinchuby, https://github.com/thiagocrepaldi
Update the usage of torch.onnx.OnnxRegistry, as it's officially published in PyTorch: pytorch/pytorch#106140. --------- Co-authored-by: Wei-Sheng Chin <[email protected]>
Stack from ghstack (oldest at bottom):
The official move of
OnnxRegistry
totorch.onnx
allows it to become one of the parameters intorch.onnx.ExportOption
. By incorporatingOnnxRegistry
intorch.onnx.ExportOption
, users gain access to various functionalities, including the ability to register custom operators usingregister_custom_op
, check whether an operator is supported usingis_registered_op
, and obtain symbolic functions that support specific operators usingget_functions
.Additionally,
opset_version
is now exclusively available intorch.onnx.OnnxRegistry
as it is removed fromtorch.onnx.ExportOption
. The initialization of the registry with torchlib under the provided opset version ensures that the exporter uses the specified opset version as the primary version for exporting.These changes encompass scenarios where users can:
NOTE: The custom registered function will be prioritized in onnx dispatcher, and if there are multiple custom ones, the one registered the last will be picked.