Separate CoreML util and inmemoryfs targets to be reusable (#9481)
### Summary In this diff, we separate the targets for `coreml/runtime/util` and `coreml/runtime/inmemoryfs`. #### Why? As part of https://github.com/pytorch/executorch/issues/9019, we want to support CoreML export out-of-the-box. Unfortunately, part of the workflow now includes installing an executorch+coreml binding as a pip wheel: https://github.com/pytorch/executorch/blob/5fdfa511966208c7e237a9e920a7c63f513b4fb7/backends/apple/coreml/scripts/install_inmemoryfs.sh#L20 This then gets used throughout the library. i.e. https://github.com/pytorch/executorch/blob/5fdfa511966208c7e237a9e920a7c63f513b4fb7/backends/apple/coreml/compiler/coreml_preprocess.py#L19 So we want to now bake this pybinding into the main wheel. Ultimately this `executorchcoreml` module, gets built using inmemoryfs: https://github.com/pytorch/executorch/blob/5fdfa511966208c7e237a9e920a7c63f513b4fb7/backends/apple/coreml/runtime/inmemoryfs/setup.py#L17-L38 So, to enable creating a pybinding target, we must first decouple the `util` and `inmemoryfs` libraries so they can be used in `coremldelegate` and the future pybinding. ### Test plan This should really be a no-op w.r.t. builds. So, CI + ``` $ ./install_executorch.sh --pybind coreml ``` cc @larryliu0820 @lucylq
J
jathu committed
cb583f32460e5736d43aa4afe9f99efc7244f440
Parent: d15c0d0
Committed by GitHub <noreply@github.com>
on 3/24/2025, 11:56:54 PM