-
Notifications
You must be signed in to change notification settings - Fork 747
Support for Dtye Selective Build from Dictionary API in OSS (cmake) #12873
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12873
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 4 New Failures, 1 Unrelated FailureAs of commit 6ba45eb with merge base 8651d31 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: none" |
|
|
||
| # Option to enable parsing ops and dtypes from json formatted dictionary | ||
| option(EXECUTORCH_SELECT_OPS_FROM_DICT | ||
| "Enable op selection from json formattting string during build." OFF |
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.
Could we add a link to the supported dtype strings, e.g. https://github.com/pytorch/executorch/blame/0211a0346455f5b1ce445c2bdf6fce89a9aa04c9/shim_et/xplat/executorch/codegen/codegen.bzl#L51
^ actually I think this list is too broad and not all supported in ET 😅
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 think there are actually only 8 dtypes that are supported and tested. I remember seeing a list of them somewhere in the code base, will note them here.
849311e to
6828f13
Compare
6828f13 to
6ba45eb
Compare
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Summary
When attempting to build minimal binary size with only a select number of operators and dtypes, it's advantageous to simply specify only the needed selections at compile time. This PR allows one to specify a JSON formatted string to select operators and dtypes to be included in the final binary. An example is also provided.
Test plan
This feature was tested with the added example in
examples/selective_build/test_selective_build.shwhich now has a function namedtest_cmake_select_ops_in_dict(). This function exemplifies the usage of the newly added dictionary API.