You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update on "[ET-VK] Enable dynamic operator registration"
This change follows
1. in the footsteps of #2222 for static initialization and
2. the popular `TorchLibraryImpl` for wrapping with macros.
https://www.internalfb.com/code/fbsource/[b6860acf0fd7a95224f2ed3f6fe48f699a9a45c0]/fbcode/caffe2/torch/library.h?lines=1004%2C1012-1026
Contributors can now write their operator and register them within the same file using `REGISTER_OPERATORS` + `VK_REGISTER_OP()`, as shown in `Arithmetic.h/cpp`.
Typically in Linux/Android C++ environments, the symbols corresponding to `OperatorRegisterInit` static instances are discarded since they aren't used for anything other than static initialization. Hence, we need to `link_whole = True` for the `vulkan_graph_runtime` library.
We update our Compute API tests to verify we can go through `OperatorRegistry` with proper static initialization.
Differential Revision: [D54641117](https://our.internmc.facebook.com/intern/diff/D54641117/)
[ghstack-poisoned]
0 commit comments