-
Notifications
You must be signed in to change notification settings - Fork 751
Separate CoreML util and inmemoryfs targets to be reusable #9481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
mergennachin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments
1f3966d to
05b129a
Compare
d9f8ff5 to
639128b
Compare
639128b to
7f6cdc3
Compare
7f6cdc3 to
a03a108
Compare
3172a23 to
ecbceb5
Compare
067d471 to
fdc8ffc
Compare
swolchok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems fine, leaving accept for @shoumikhin
fdc8ffc to
b0a8f96
Compare
43afb06 to
edb05ce
Compare
|
LGTM and I'd also asked @cymbalrush to glance |
edb05ce to
f96e713
Compare
f96e713 to
6c82a26
Compare
### 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