-
Notifications
You must be signed in to change notification settings - Fork 713
Extracting dtype information from model PTE in OSS #11504
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11504
Note: Links to docs will display an error until the docs builds have been completed. ❌ 187 New FailuresAs of commit ed4c08d with merge base 0d244f9 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: none" |
This PR needs a
|
|
Thanks for adding this! Can we check against mv3.pte, which has some more operators than addmul?
Result from internal: P1836375803 |
1abc18a to
087a853
Compare
087a853 to
366c47a
Compare
|
@BujSet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
81af05e to
901a262
Compare
|
@BujSet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
codegen/tools/targets.bzl
Outdated
| deps = [ | ||
| ":gen_oplist_lib", | ||
| ], | ||
| ] + [] if runtime.is_oss else ["//exir:lib"], # TODO This is a hack to run on fbcode. These targets depends on exir which is only available in fbcode. |
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 it should be //executorch/exir:lib
|
@BujSet has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
9159927 to
c47f1ba
Compare
c47f1ba to
ed4c08d
Compare
Summary
Previously, exporting kernel dtypes was accomplished via
gen_oplist.pybut was only supported in internal-only scripts. This functionality of scraping models for dtypes to make them available for the dtype selective build is now implemented for OSS and internal, removing dependance on internal only scripts.Fixes #11434: 11434Test plan
Manually tested on the
add_mul.pteandmv3.pteexample models. After building executorch, ranpython3 -m codegen.tools.gen_oplist --model_file_path add_mul.pte --output_path add_mul_model.txt. The resultsadd_mul_model.txtfile is a YAML file that now includes dtype info in the kernel metadata section, as shown below:Comparable results were seen on the
mve3.ptemodel (generated viapython -m examples.portable.scripts.export --model_name="mv3").CI flow is also updated to enable unittests for
gen_oplist.pyfor the selective build process.