Separate CoreML util and inmemoryfs targets to be reusable#9481
Merged
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. |
larryliu0820
approved these changes
Mar 21, 2025
mergennachin
approved these changes
Mar 21, 2025
Contributor
mergennachin
left a comment
There was a problem hiding this comment.
See inline comments
1f3966d to
05b129a
Compare
mergennachin
approved these changes
Mar 21, 2025
d9f8ff5 to
639128b
Compare
jathu
commented
Mar 21, 2025
639128b to
7f6cdc3
Compare
7f6cdc3 to
a03a108
Compare
3172a23 to
ecbceb5
Compare
067d471 to
fdc8ffc
Compare
swolchok
reviewed
Mar 24, 2025
Contributor
swolchok
left a comment
There was a problem hiding this comment.
seems fine, leaving accept for @shoumikhin
fdc8ffc to
b0a8f96
Compare
43afb06 to
edb05ce
Compare
Contributor
|
LGTM and I'd also asked @cymbalrush to glance |
cymbalrush
approved these changes
Mar 24, 2025
shoumikhin
approved these changes
Mar 24, 2025
edb05ce to
f96e713
Compare
f96e713 to
6c82a26
Compare
jathu
added a commit
that referenced
this pull request
Mar 25, 2025
### 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
jathu
added a commit
that referenced
this pull request
Mar 26, 2025
### 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
kirklandsign
pushed a commit
that referenced
this pull request
Apr 11, 2025
### 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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