-
Notifications
You must be signed in to change notification settings - Fork 695
Add export recipes for xnnpack (#12069) #12070
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
Add export recipes for xnnpack (#12069) #12070
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12070
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 PendingAs of commit 0827d84 with merge base 042eb1a ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
This PR needs a
|
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Differential Revision: D77414795
b46b07e to
ce2010d
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Adds five recipes: a. static per channel quant b. static per tensor quant c. dynamic per channel quant d. fp32 e. 8a4w Differential Revision: D77414795
ce2010d to
e053611
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
e053611 to
6e1f918
Compare
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Adds five recipes: a. static per channel quant b. static per tensor quant c. dynamic per channel quant d. fp32 e. 8a4w Differential Revision: D77414795
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Adds five recipes: a. static per channel quant b. static per tensor quant c. dynamic per channel quant d. fp32 e. 8a4w Differential Revision: D77414795
6e1f918 to
ee59d57
Compare
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Adds five recipes: a. static per channel quant b. static per tensor quant c. dynamic per channel quant d. fp32 e. 8a4w Differential Revision: D77414795
ee59d57 to
e2549fc
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Pull Request resolved: pytorch#12070 Enables basic export recipes for XNNPack backend described in pytorch#12069 Adds five recipes: a. static per channel quant b. static per tensor quant c. dynamic per channel quant d. fp32 e. 8a4w Differential Revision: D77414795
e2549fc to
3290db4
Compare
Summary: Pull Request resolved: pytorch#12070 Enables basic export recipes for XNNPack backend described in pytorch#12069 Added recipes: 1. int8 da per channel 2. int8 da per tensor 3. int8 static per channel 4. int8 static per tensor 5. int8da4w dynamic per channel 6. int8da4w dynamic per tensor Reviewed By: metascroy, kimishpatel Differential Revision: D77414795
3290db4 to
913b42d
Compare
e812b10 to
6c2af2a
Compare
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
6c2af2a to
bb68de8
Compare
|
@abhinaykukkadapu has imported this pull request. If you are a Meta employee, you can view this in D77414795. |
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
bb68de8 to
42691df
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, mcr229, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
42691df to
ef5d66e
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, mcr229, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
ef5d66e to
cd09f96
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, mcr229, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
cd09f96 to
b4ad4fa
Compare
|
This pull request was exported from Phabricator. Differential Revision: D77414795 |
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, mcr229, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
b4ad4fa to
df0cb02
Compare
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, mcr229, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
df0cb02 to
3b6a308
Compare
Summary: Enables basic export recipes for XNNPack backend described in pytorch#12069 Pull Request resolved: pytorch#12070 Test Plan: Imported from GitHub, without a `Test Plan:` line. Rollback Plan: Reviewed By: metascroy, mcr229, kimishpatel Differential Revision: D77414795 Pulled By: abhinaykukkadapu
3b6a308 to
0827d84
Compare
|
@abhinaykukkadapu has imported this pull request. If you are a Meta employee, you can view this in D77414795. |
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.
Sorry a bit late, forgot to submit earlier
| class XNNPACKRecipeProvider(BackendRecipeProvider): | ||
| @property | ||
| def backend_name(self) -> str: | ||
| return "xnnpack" |
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.
we might already have this somewhere. Just want to make sure we are consistent.
| return list(XNNPackRecipeType) | ||
|
|
||
| def create_recipe( | ||
| self, recipe_type: RecipeType, **kwargs: Any |
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.
Do we have to use kwargs? It makes it hard to read and easier to slip on typing checks or other validations.
| if recipe_type == XNNPackRecipeType.FP32: | ||
| return self._build_fp32_recipe(recipe_type) | ||
|
|
||
| elif recipe_type == XNNPackRecipeType.INT8_DYNAMIC_PER_CHANNEL: |
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.
nit using a match stmt might be cleaner?
| ) | ||
|
|
||
| quant_recipe = QuantizationRecipe( | ||
| quantizers=None, |
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.
why is this none?
| ) | ||
|
|
||
| def test_all_models_with_recipes(self) -> None: | ||
| models_to_test = [ |
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.
nice!
Summary: Enables basic export recipes for XNNPack backend described in #12069
Differential Revision: D77414795