Skip to content

Conversation

@metascroy
Copy link
Contributor

Addressing #8527

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 20, 2025

🔗 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 Failure

As of commit bf272de with merge base d6149e1 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 20, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.


---

### Runtime:
Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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.


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.

---
Copy link
Contributor Author

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

Copy link
Member

@GregoryComer GregoryComer left a 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.

@metascroy metascroy marked this pull request as ready for review March 20, 2025 22:47
@metascroy metascroy requested a review from mergennachin as a code owner March 20, 2025 22:47
@metascroy
Copy link
Contributor Author

@YifanShenSZ can I get a review on the doc updates for CoreML

Copy link
Collaborator

@YifanShenSZ YifanShenSZ left a 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.
Copy link
Collaborator

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(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@metascroy metascroy merged commit bd87ca5 into main Mar 21, 2025
79 of 80 checks passed
@metascroy metascroy deleted the coreml-doc-update branch March 21, 2025 04:03
oscarandersson8218 pushed a commit to oscarandersson8218/executorch that referenced this pull request Mar 21, 2025
@mergennachin
Copy link
Contributor

Thank you @metascroy

DannyYuyang-quic pushed a commit to CodeLinaro/executorch that referenced this pull request Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants