-
Notifications
You must be signed in to change notification settings - Fork 778
Description
🚀 The feature, motivation and pitch
This request came from @shoumikhin.
For developers on Xcode, they wanted to be able to pick and use kernels_optimized, kernels_quantized and kernels_custom libraries in their application.
The caveat is that since they all use static initialization kernel registration mechanism, all of these libraries requires --force_load linker flag here:
This causes churns for app developers because they will have to add these linker flags manually and it's not an out of the box experience.
To fix this, we wanted to allow user to pass in a library name to codegen and generate a register_<lib_name>_kernels API.
Currently we trigger selective build using this API:
https://github.com/pytorch/executorch/blob/main/tools/cmake/Codegen.cmake#L63C10-L63C39
We want to add a new argument LIB_NAME and pass the value all the way down into the python script here:
https://github.com/pytorch/executorch/blob/main/tools/cmake/Codegen.cmake#L95
Then inside the python script, add an optional argument to take the lib name and optionally generate register_<lib_name>_kernels API.
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status
