Uh oh!
There was an error while loading. Please reload this page.
Separate CoreML util and inmemoryfs targets to be reusable - #9481
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9481
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 6 PendingAs of commit 6c82a26 with merge base 06ec67c ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
1f3966d to
05b129aCompared9f8ff5 to
639128bCompareUh oh!
There was an error while loading. Please reload this page.
3172a23 to
ecbceb5Compare067d471 to
fdc8ffcCompare
swolchok
left a comment
There was a problem hiding this comment.
seems fine, leaving accept for @shoumikhin
Uh oh!
There was an error while loading. Please reload this page.
43afb06 to
edb05ceCompareshoumikhin
commented
Mar 24, 2025
LGTM and I'd also asked @cymbalrush to glance |
### Summary Context: #9481 We now create the pybinding target for inmemoryfs. Note that the build recipe is from the wheel builder: https://github.com/pytorch/executorch/blob/5fdfa511966208c7e237a9e920a7c63f513b4fb7/backends/apple/coreml/runtime/inmemoryfs/setup.py#L17-L38 ### Test plan ``` $ cmake -B cmake-out -S . -DEXECUTORCH_BUILD_PYBIND=ON -DEXECUTORCH_BUILD_COREML=ON $ cmake --build cmake-out -j$(sysctl -n hw.ncpu) --target executorchcoreml $ ./install_executorch.sh --pybind coreml ``` cc @larryliu0820@lucylq
### Summary Context: #9481 * Include the `executorchcoreml` pybinding in the builds * Remove separate installation option * Turn on CoreML by default for macOS builds * Add a dependency on coremltools for macOS ### Test plan CI ``` $ rm -rf cmake-out pip-out dist && ./install_executorch.sh $ ./examples/models/llama/install_requirements.sh $ .ci/scripts/test_llama.sh -model stories110M -build_tool cmake -dtype fp32 -mode coreml $ .ci/scripts/test_llama.sh -model stories110M -build_tool cmake -dtype fp32 -mode xnnpack+custom+quantize_kv ``` cc @larryliu0820@lucylq
### Summary Context: #9481 * Include the `executorchcoreml` pybinding in the builds * Remove separate installation option * Turn on CoreML by default for macOS builds * Add a dependency on coremltools for macOS ### Test plan CI ``` $ rm -rf cmake-out pip-out dist && ./install_executorch.sh $ ./examples/models/llama/install_requirements.sh $ .ci/scripts/test_llama.sh -model stories110M -build_tool cmake -dtype fp32 -mode coreml $ .ci/scripts/test_llama.sh -model stories110M -build_tool cmake -dtype fp32 -mode xnnpack+custom+quantize_kv ``` cc @larryliu0820@lucylq
Summary
In this diff, we separate the targets for
coreml/runtime/utilandcoreml/runtime/inmemoryfs.Why?
As part of #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:
executorch/backends/apple/coreml/scripts/install_inmemoryfs.sh
Line 20 in 5fdfa51
This then gets used throughout the library. i.e.
executorch/backends/apple/coreml/compiler/coreml_preprocess.py
Line 19 in 5fdfa51
So we want to now bake this pybinding into the main wheel. Ultimately this
executorchcoremlmodule, gets built using inmemoryfs:executorch/backends/apple/coreml/runtime/inmemoryfs/setup.py
Lines 17 to 38 in 5fdfa51
So, to enable creating a pybinding target, we must first decouple the
utilandinmemoryfslibraries so they can be used incoremldelegateand the future pybinding.Test plan
This should really be a no-op w.r.t. builds. So, CI +
cc @larryliu0820@lucylq