Skip to content

Conversation

@BujSet
Copy link
Contributor

@BujSet BujSet commented Jun 12, 2025

Summary

Added support for parsing the selected operators and dtypes directly from an exported model to a selected_operators.yaml file. Previously, operators had to be specified in string list or in a schema yaml file for the selective build process. Now, a model can be specified at build time (e.g. -DEXECUTORCH_SELECT_OPS_FROM_MODEL="./mv2.pte") to parse and select operators.

Test plan

Added a test for this in examples/selective_build/test_selective_build.sh. When run with bash examples/selective_build/test_selective_build.sh cmake a resultant selected_operators.yaml file is created at cmake-out/examples/selective_build/select_build_lib/selected_operators.yaml that conatins the selected operators as well as their dtypes.

@pytorch-bot
Copy link

pytorch-bot bot commented Jun 12, 2025

🔗 Helpful Links

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

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

⏳ 2 Pending, 1 Unrelated Failure

As of commit 76ec14f with merge base 8895573 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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 Jun 12, 2025
@BujSet
Copy link
Contributor Author

BujSet commented Jun 12, 2025

@pytorchbot label "release notes: none"

@pytorch-bot pytorch-bot bot added the release notes: none Do not include this in the release notes label Jun 12, 2025
@BujSet BujSet added ciflow/trunk ciflow/binaries and removed release notes: none Do not include this in the release notes labels Jun 12, 2025
@BujSet BujSet self-assigned this Jun 12, 2025
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

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

Copy link
Contributor

@lucylq lucylq left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for adding this!

@BujSet BujSet force-pushed the model_api_in_oss_selective_build branch 2 times, most recently from 4e96927 to 095d469 Compare June 12, 2025 20:50
@BujSet BujSet marked this pull request as ready for review June 12, 2025 22:31
@BujSet BujSet force-pushed the model_api_in_oss_selective_build branch from 095d469 to 4fc5fe0 Compare June 12, 2025 22:35
@BujSet BujSet force-pushed the model_api_in_oss_selective_build branch from 4fc5fe0 to 76ec14f Compare June 12, 2025 22:46
@BujSet BujSet merged commit f1a23fa into pytorch:main Jun 13, 2025
371 of 374 checks passed
@BujSet BujSet deleted the model_api_in_oss_selective_build branch June 13, 2025 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries ciflow/trunk 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.

3 participants