Skip to content

Conversation

@junpi3
Copy link
Contributor

@junpi3 junpi3 commented Mar 7, 2024

Stack from ghstack (oldest at bottom):

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

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]
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 7, 2024

🔗 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 Failure

As of commit 50eec4e with merge base 47b837b (image):

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.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 7, 2024
@facebook-github-bot
Copy link
Contributor

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]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D54640160

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 9b3925d.

kedarnath03 pushed a commit to kedarnath03/executorch that referenced this pull request Jun 25, 2025
Pull Request resolved: pytorch/executorch#2304

Align `OperatorRegistry` with the style of `ShaderRegistry` in pytorch/executorch#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.
ghstack-source-id: 217884084
@exported-using-ghexport

Differential Revision: [D54640160](https://our.internmc.facebook.com/intern/diff/D54640160/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants