[ET-VK] Reorganize op_registry.py by C++ implementation file#17335
[ET-VK] Reorganize op_registry.py by C++ implementation file#17335meta-codesync[bot] merged 1 commit intogh/SS-JIA/413/basefrom
Conversation
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]
🔗 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 FailuresAs of commit af891cc with merge base ba89c69 ( 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. |
This PR needs a
|
a4b2e1f
into
gh/SS-JIA/413/base
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
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:
MatMul.cpp vs Linear.cpp, Reduce.cpp vs ArgReduce.cpp)
register_<cpp_file>_cpp_ops()for groupedregistrations,
register_<op_name>()for single-op registrationswhen they share a C++ file (e.g., permute vs permute_copy have different
storage requirements)
Authored with Claude Code.
Differential Revision: D92740293