Skip to content

[ET-VK] Reorganize op_registry.py by C++ implementation file#17335

Merged
meta-codesync[bot] merged 1 commit intogh/SS-JIA/413/basefrom
gh/SS-JIA/413/head
Feb 10, 2026
Merged

[ET-VK] Reorganize op_registry.py by C++ implementation file#17335
meta-codesync[bot] merged 1 commit intogh/SS-JIA/413/basefrom
gh/SS-JIA/413/head

Conversation

@SS-JIA
Copy link
Copy Markdown
Contributor

@SS-JIA SS-JIA commented Feb 10, 2026

Stack from ghstack (oldest at bottom):

Previously, operator registrations were grouped by shared OpFeatures
characteristics, which made it difficult to verify that registrations
accurately reflected the capabilities of their C++ implementations. For
example, operators from different C++ files (View.cpp, Squeeze.cpp,
Clone.cpp, Gather.cpp) were grouped together in a single registration
because they happened to share the same storage requirements.

This reorganization groups registrations by their C++ implementation file,
making it straightforward to cross-reference Python registrations with
their corresponding C++ code. When an operator's C++ implementation changes,
the relevant Python registration is now easy to locate and update.

Key changes:

  • Added section headers indicating the C++ file for each registration group
  • Split registrations where operators mapped to different C++ files (e.g.,
    MatMul.cpp vs Linear.cpp, Reduce.cpp vs ArgReduce.cpp)
  • Adopted consistent naming: register_<cpp_file>_cpp_ops() for grouped
    registrations, register_<op_name>() for single-op registrations
  • Kept separate registrations for ops with different characteristics even
    when they share a C++ file (e.g., permute vs permute_copy have different
    storage requirements)

Authored with Claude Code.

Differential Revision: D92740293

Previously, operator registrations were grouped by shared OpFeatures
characteristics, which made it difficult to verify that registrations
accurately reflected the capabilities of their C++ implementations. For
example, operators from different C++ files (View.cpp, Squeeze.cpp,
Clone.cpp, Gather.cpp) were grouped together in a single registration
because they happened to share the same storage requirements.

This reorganization groups registrations by their C++ implementation file,
making it straightforward to cross-reference Python registrations with
their corresponding C++ code. When an operator's C++ implementation changes,
the relevant Python registration is now easy to locate and update.

Key changes:
- Added section headers indicating the C++ file for each registration group
- Split registrations where operators mapped to different C++ files (e.g.,
  MatMul.cpp vs Linear.cpp, Reduce.cpp vs ArgReduce.cpp)
- Adopted consistent naming: `register_<cpp_file>_cpp_ops()` for grouped
  registrations, `register_<op_name>()` for single-op registrations
- Kept separate registrations for ops with different characteristics even
  when they share a C++ file (e.g., permute vs permute_copy have different
  storage requirements)

Authored with Claude Code.

Differential Revision: [D92740293](https://our.internmc.facebook.com/intern/diff/D92740293/)

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Feb 10, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17335

Note: Links to docs will display an error until the docs builds have been completed.

❌ 7 New Failures, 2 Unrelated Failures

As of commit af891cc with merge base ba89c69 (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following jobs 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.

@meta-cla meta-cla 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 Feb 10, 2026
@github-actions
Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@meta-codesync meta-codesync Bot merged commit a4b2e1f into gh/SS-JIA/413/base Feb 10, 2026
182 of 201 checks passed
@meta-codesync meta-codesync Bot deleted the gh/SS-JIA/413/head branch February 10, 2026 22:18
SS-JIA pushed a commit that referenced this pull request Feb 11, 2026
Previously, operator registrations were grouped by shared OpFeatures
characteristics, which made it difficult to verify that registrations
accurately reflected the capabilities of their C++ implementations. For
example, operators from different C++ files (View.cpp, Squeeze.cpp,
Clone.cpp, Gather.cpp) were grouped together in a single registration
because they happened to share the same storage requirements.

This reorganization groups registrations by their C++ implementation file,
making it straightforward to cross-reference Python registrations with
their corresponding C++ code. When an operator's C++ implementation changes,
the relevant Python registration is now easy to locate and update.

Key changes:
- Added section headers indicating the C++ file for each registration group
- Split registrations where operators mapped to different C++ files (e.g.,
  MatMul.cpp vs Linear.cpp, Reduce.cpp vs ArgReduce.cpp)
- Adopted consistent naming: `register_<cpp_file>_cpp_ops()` for grouped
  registrations, `register_<op_name>()` for single-op registrations
- Kept separate registrations for ops with different characteristics even
  when they share a C++ file (e.g., permute vs permute_copy have different
  storage requirements)

Authored with Claude Code.

Differential Revision: [D92740293](https://our.internmc.facebook.com/intern/diff/D92740293/)

ghstack-source-id: 339885886
Pull Request resolved: #17335
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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants