Skip to content

Conversation

@jakmro
Copy link
Contributor

@jakmro jakmro commented Nov 5, 2024

Summary

This PR introduces the EfficientSAM model, along with the instructions for exporting it to Core ML and XNNPACK using ExecuTorch.

Integrating the export-ready EfficientSAM example into ExecuTorch broadens the range of available examples.

Test plan

  • Followed the instructions in examples/models/efficient_sam/README.md to export the model to Core ML and XNNPACK.
  • Ensured the exported models function as expected.
  • Added test_efficient_sam_export_to_executorch in examples/models/test/test_export.py.

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 5, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6659

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit cd7d115 with merge base 98e4dd5 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@facebook-github-bot
Copy link
Contributor

Hi @jakmro!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@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 Nov 5, 2024
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 5, 2024

Please seek CI approval before scheduling CIFlow labels

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 5, 2024

Please seek CI approval before scheduling CIFlow labels

Copy link
Contributor

@iseeyuan iseeyuan left a comment

Choose a reason for hiding this comment

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

Thank you for adding this example! Please add more inline comments to the source files: cite sources and highlight modifications if there are any.

@@ -0,0 +1,316 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you cite the source of this file, as well as the encoder/decoder?

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also highlight if there are any modifications to make it exportable to ExecuTorch?

Copy link
Contributor Author

@jakmro jakmro Nov 16, 2024

Choose a reason for hiding this comment

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

Yes, of course.


Follow the [tutorial](https://pytorch.org/executorch/main/getting-started-setup#) to set up ExecuTorch.

## 2. Exports
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any performance numbers of those two backend? Would be great to list them here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have just listed some performance numbers.

@jakmro jakmro requested a review from iseeyuan November 16, 2024 22:41
Copy link
Contributor

@iseeyuan iseeyuan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for updating!

@jakmro
Copy link
Contributor Author

jakmro commented Nov 22, 2024

Hi @iseeyuan, what are the next steps? Is there anything else I can do?

@facebook-github-bot
Copy link
Contributor

@iseeyuan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@iseeyuan
Copy link
Contributor

iseeyuan commented Dec 5, 2024

@jakmro , could you rebase your PR and make sure all CI tests pass? Referring to https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests, if you have write permission, please go ahead and merge it. If you don't have write permission please let me know and I can merge it for you.

@iseeyuan
Copy link
Contributor

iseeyuan commented Dec 6, 2024

@pytorchbot rebase -b main

@facebook-github-bot
Copy link
Contributor

@iseeyuan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jakmro
Copy link
Contributor Author

jakmro commented Dec 6, 2024

@iseeyuan There are still two Facebook Internal CI checks failing, but I don’t have access to the logs. Could you help me understand what’s causing the issue? Thanks!

@jakmro
Copy link
Contributor Author

jakmro commented Dec 10, 2024

@jakmro , could you rebase your PR and make sure all CI tests pass? Referring to https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests, if you have write permission, please go ahead and merge it. If you don't have write permission please let me know and I can merge it for you.

Unfortunately, I also don't have write permission.

@iseeyuan
Copy link
Contributor

@pytorchbot rebase -b main

@iseeyuan
Copy link
Contributor

@jakmro Let me look into it then. I've disabled internal CIs because they are already covered by OSS CI. I'm rebasing it and see if the internal CI failure is gone.

@iseeyuan
Copy link
Contributor

@pytorchbot rebase

@facebook-github-bot
Copy link
Contributor

@iseeyuan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot merged commit 037c937 into pytorch:main Dec 14, 2024
41 of 43 checks passed
@iseeyuan
Copy link
Contributor

@jakmro The PR has been merged. The major issue is from internal tests, where it does not allow accessing external urls. I've disabled the internal tests since they are already covered by OSS CI. Next time when a new model is added, we get all signals from OSS that all contributors can see, and the efficiency should be much better. Thanks for your patience!

@jakmro
Copy link
Contributor Author

jakmro commented Dec 17, 2024

Thanks for the update and the code review.

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. topic: not user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants