Skip to content

MV2 cpp and python example #13

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

Merged
merged 1 commit into from
Apr 9, 2025
Merged

MV2 cpp and python example #13

merged 1 commit into from
Apr 9, 2025

Conversation

mergennachin
Copy link
Contributor

No description provided.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 9, 2025

4. Run the demo application:
```bash
./build/bin/executorch_mv2_demo_app /path/to/your/model.pte
Copy link
Contributor

Choose a reason for hiding this comment

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

path is hardcoded in the main.cpp?

@mergennachin mergennachin force-pushed the mv2_examples branch 2 times, most recently from 17bca24 to 961c1de Compare April 9, 2025 21:03
@mergennachin mergennachin requested a review from jathu April 9, 2025 21:06
mv2/cpp/main.cpp Outdated
Module module("../python/model_mv2_xnnpack.pte");

// Create an input tensor.
float input[1 * 3 * 256 * 256];
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: update the size here as well?

@kirklandsign
Copy link
Contributor

0.6.0 is not in pypi yet. Is our strategy just use 0.6.0 for now, or update this docs after it's available?

@mergennachin
Copy link
Contributor Author

0.6.0 is not in pypi yet. Is our strategy just use 0.6.0 for now, or update this docs after it's available?

Yeah, it's fine if it's not available in pypi yet. We will just use this for now -- I don't think anyone's really looking at this repo for now.

@mergennachin mergennachin merged commit 54b0238 into main Apr 9, 2025
1 check passed
nil-is-all pushed a commit that referenced this pull request Apr 23, 2025
nil-is-all pushed a commit that referenced this pull request Apr 23, 2025
nil-is-all added a commit that referenced this pull request Apr 23, 2025
author Nikhil Viswanath Sivakumar <68182521+nil-is-all@users.noreply.github.com> 1741841357 -0500
committer Nikhil Viswanath Sivakumar <nikhilviswanath@meta.com> 1745433893 -0500
Migrate iOS Demo App

parent 5021c18
author Nikhil Viswanath Sivakumar <68182521+nil-is-all@users.noreply.github.com> 1741841357 -0500
committer Nikhil Viswanath Sivakumar <nikhilviswanath@meta.com> 1745433648 -0500
Migrate iOS Demo App

Migrate iOS app demo as README.md

Reproduced https://github.com/pytorch/executorch/tree/main/examples/demo-apps/apple_ios/ExecuTorchDemo and added last line in docs to point to this GitHub repo

Changed file path to executorch-examples/mv3/apple/MobileNetV3Demo/README.md

Changed directory and made changes after local testing

Final directory: executorch-examples/mv3/apple/ExecuTorchDemo

Changes from [current demo](https://pytorch.org/executorch/main/demo-apps-ios.html#):
1) Check Swift Package Manager version under Prerequisites
2) Export Model - export.py for backends
3) Directory changes in Final Steps

Files for iOS MV3 Demo App

export script for MV3.pte and XNNPack, CoreML, MPS backends

Update README.md

Rename mv3/apple/ExecuTorchDemo/export.py to mv3/apple/ExecuTorchDemo/python/export.py

Removed export.py code block from README.md

Added code formatting for Clone the Demo App subsection

added snapshot url

Delete mv3/apple/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet directory

atomically migrated apple/ExecuTorch to mv3/apple/ExecuTorchDemo

Updated directory structure to have python in mv3 folder

fixed typo in .gitignore

Update project.pbxproj to pin to 0.6.0 (#11)

MV2 cpp and python example (#13)

Update README.md (#12)

* Update README.md

* Update README.md

fix directory and resolve conflicts

MV2 cpp and python example (#13)

Update .gitignore (#17)
nil-is-all added a commit that referenced this pull request Apr 23, 2025
author Nikhil Viswanath Sivakumar <68182521+nil-is-all@users.noreply.github.com> 1741841357 -0500
committer Nikhil Viswanath Sivakumar <nikhilviswanath@meta.com> 1745433893 -0500
Migrate iOS Demo App

parent 5021c18
author Nikhil Viswanath Sivakumar <68182521+nil-is-all@users.noreply.github.com> 1741841357 -0500
committer Nikhil Viswanath Sivakumar <nikhilviswanath@meta.com> 1745433648 -0500
Migrate iOS Demo App

Migrate iOS app demo as README.md

Reproduced https://github.com/pytorch/executorch/tree/main/examples/demo-apps/apple_ios/ExecuTorchDemo and added last line in docs to point to this GitHub repo

Changed file path to executorch-examples/mv3/apple/MobileNetV3Demo/README.md

Changed directory and made changes after local testing

Final directory: executorch-examples/mv3/apple/ExecuTorchDemo

Changes from [current demo](https://pytorch.org/executorch/main/demo-apps-ios.html#):
1) Check Swift Package Manager version under Prerequisites
2) Export Model - export.py for backends
3) Directory changes in Final Steps

Files for iOS MV3 Demo App

export script for MV3.pte and XNNPack, CoreML, MPS backends

Update README.md

Rename mv3/apple/ExecuTorchDemo/export.py to mv3/apple/ExecuTorchDemo/python/export.py

Removed export.py code block from README.md

Added code formatting for Clone the Demo App subsection

added snapshot url

Delete mv3/apple/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet directory

atomically migrated apple/ExecuTorch to mv3/apple/ExecuTorchDemo

Updated directory structure to have python in mv3 folder

fixed typo in .gitignore

Update project.pbxproj to pin to 0.6.0 (#11)

MV2 cpp and python example (#13)

Update README.md (#12)

* Update README.md

* Update README.md

fix directory and resolve conflicts

MV2 cpp and python example (#13)

Update .gitignore (#17)
mergennachin added a commit that referenced this pull request Apr 24, 2025
* parent 5021c18
author Nikhil Viswanath Sivakumar <68182521+nil-is-all@users.noreply.github.com> 1741841357 -0500
committer Nikhil Viswanath Sivakumar <nikhilviswanath@meta.com> 1745433893 -0500
Migrate iOS Demo App

parent 5021c18
author Nikhil Viswanath Sivakumar <68182521+nil-is-all@users.noreply.github.com> 1741841357 -0500
committer Nikhil Viswanath Sivakumar <nikhilviswanath@meta.com> 1745433648 -0500
Migrate iOS Demo App

Migrate iOS app demo as README.md

Reproduced https://github.com/pytorch/executorch/tree/main/examples/demo-apps/apple_ios/ExecuTorchDemo and added last line in docs to point to this GitHub repo

Changed file path to executorch-examples/mv3/apple/MobileNetV3Demo/README.md

Changed directory and made changes after local testing

Final directory: executorch-examples/mv3/apple/ExecuTorchDemo

Changes from [current demo](https://pytorch.org/executorch/main/demo-apps-ios.html#):
1) Check Swift Package Manager version under Prerequisites
2) Export Model - export.py for backends
3) Directory changes in Final Steps

Files for iOS MV3 Demo App

export script for MV3.pte and XNNPack, CoreML, MPS backends

Update README.md

Rename mv3/apple/ExecuTorchDemo/export.py to mv3/apple/ExecuTorchDemo/python/export.py

Removed export.py code block from README.md

Added code formatting for Clone the Demo App subsection

added snapshot url

Delete mv3/apple/ExecuTorchDemo/ExecuTorchDemo/Resources/Models/MobileNet directory

atomically migrated apple/ExecuTorch to mv3/apple/ExecuTorchDemo

Updated directory structure to have python in mv3 folder

fixed typo in .gitignore

Update project.pbxproj to pin to 0.6.0 (#11)

MV2 cpp and python example (#13)

Update README.md (#12)

* Update README.md

* Update README.md

fix directory and resolve conflicts

MV2 cpp and python example (#13)

Update .gitignore (#17)

* Delete xcuserdata

* Delete *.xcworkspace

---------

Co-authored-by: Mergen Nachin <mnachin@meta.com>
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 Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants