-
Notifications
You must be signed in to change notification settings - Fork 595
[ET-VK][EZ] Clean up OperatorRegistry #2304
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
Align `OperatorRegistry` with the style of `ShaderRegistry` in #2222 This means - Improve comments and comment formatting. - Use snake case, even if it deviates from the original registry I was following. Snake case is more consistent with the Vulkan backend code. https://www.internalfb.com/code/fbsource/[a97f9ed1a715231bb61b05942273f1e8f8631503]/fbcode/executorch/runtime/kernel/operator_registry.h?lines=208%2C213 - Move `using` declarations and member variables to top of class definition. - Place static `OperatorRegistry` instance declaration in a global function `operator_registry()` instead of in member function `getInstance()`. - Use macros to wrap `OperatorRegistry` functions instead of global functions. - For simplicity, remove unneeded ctor and assignment operator deletion/hiding. Note users can now create their own non-static `OperatorRegistry` instance and we can consider hiding this again later. Differential Revision: [D54640160](https://our.internmc.facebook.com/intern/diff/D54640160/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/2304
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Unrelated FailureAs of commit 50eec4e with merge base 47b837b ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D54640160 |
Align `OperatorRegistry` with the style of `ShaderRegistry` in #2222 This means - Improve comments and comment formatting. - Use snake case, even if it deviates from the original registry I was following. Snake case is more consistent with the Vulkan backend code. https://www.internalfb.com/code/fbsource/[a97f9ed1a715231bb61b05942273f1e8f8631503]/fbcode/executorch/runtime/kernel/operator_registry.h?lines=208%2C213 - Move `using` declarations and member variables to top of class definition. - Place static `OperatorRegistry` instance declaration in a global function `operator_registry()` instead of in member function `getInstance()`. - Use macros to wrap `OperatorRegistry` functions instead of global functions. - For simplicity, remove unneeded ctor and assignment operator deletion/hiding. Note users can now create their own non-static `OperatorRegistry` instance and we can consider hiding this again later. Differential Revision: [D54640160](https://our.internmc.facebook.com/intern/diff/D54640160/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D54640160 |
This pull request has been merged in 9b3925d. |
Stack from ghstack (oldest at bottom):
Align
OperatorRegistry
with the style ofShaderRegistry
in #2222This means
https://www.internalfb.com/code/fbsource/[a97f9ed1a715231bb61b05942273f1e8f8631503]/fbcode/executorch/runtime/kernel/operator_registry.h?lines=208%2C213
using
declarations and member variables to top of class definition.OperatorRegistry
instance declaration in a global functionoperator_registry()
instead of in member functiongetInstance()
.OperatorRegistry
functions instead of global functions.OperatorRegistry
instance and we can consider hiding this again later.Differential Revision: D54640160