-
Notifications
You must be signed in to change notification settings - Fork 713
CoreML doc updates #9463
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
CoreML doc updates #9463
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9463
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit bf272de with merge base d6149e1 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
docs/source/backends-coreml.md
Outdated
|
|
||
| --- | ||
|
|
||
| ### Runtime: |
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.
The rest of the section discusses building iOS frameworks and the SDK.
@GregoryComer I assume you don't want this content in the backend delegate documentation because it isn't in the template. Is there somewhere else this is going?
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.
I'm okay either way, at this point. I think it makes most sense to not go into too much detail here, but we can mention that it is included with iOS frameworks. SDK/devtools integration is probably also good to mention.
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.
It actually looks like the ios framework is discussed in the getting started section, so let me remove that from here. I'll also remove the SDK discussion for now. It's not mentioned in the XNNPACK backend doc, and I'm sure it's covered in more details on the SDK docs.
With those changes, the CoreML doc update will mirror the XNNPACK one exactly, except it has one "Advanced" section at the end about extracting mlpackage files.
docs/source/backends-coreml.md
Outdated
|
|
||
| After generating the CoreML-delegated .pte, the model can be tested from Python using the ExecuTorch runtime python bindings. This can be used to sanity check the model and evaluate numerical accuracy. See [Testing the Model](using-executorch-export.md#testing-the-model) for more information. | ||
|
|
||
| --- |
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.
TODO: need to add quantization section using the CoreMLQuantizer, at least for 8bit
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.
Thanks for taking this. Looks great.
aae3f51 to
bf272de
Compare
|
@YifanShenSZ can I get a review on the doc updates for CoreML |
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.
Thanks for polishing Core ML delegate doc 🙏
| # Runs the exported mv3 model using the Core ML backend. | ||
| ./coreml_executor_runner --model_path mv3_coreml_all.pte | ||
| ``` | ||
| To target the CoreML backend during the export and lowering process, pass an instance of the `CoreMLPartitioner` to `to_edge_transform_and_lower`. The example below demonstrates this process using the MobileNet V2 model from torchvision. |
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.
💯
| 1. [Optional] Generate an [ETRecord](./etrecord.rst) when exporting your model. | ||
| ```bash | ||
| cd executorch | ||
| et_program = to_edge_transform_and_lower( |
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.
💯
Addressing pytorch#8527
|
Thank you @metascroy |
Addressing pytorch#8527
Addressing #8527