Skip to content

[ExecuTorch] Add broadcasting support to optimized op_div #8257

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 17 commits into from
Feb 24, 2025

Conversation

kimishpatel
Copy link
Contributor

@kimishpatel kimishpatel commented Feb 6, 2025

Stack from ghstack (oldest at bottom):

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc @larryliu0820 @manuelcandales

Differential Revision: D69491815

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Feb 6, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 398e078 with merge base 5cf0106 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

kimishpatel added a commit that referenced this pull request Feb 6, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e7ddbae
Pull Request resolved: #8257
@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 Feb 6, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 6, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 3466308
Pull Request resolved: #8257
@kimishpatel kimishpatel requested a review from swolchok February 6, 2025 06:41
@kimishpatel kimishpatel added module: kernels Issues related to kernel libraries and utilities, and code under kernels/ release notes: ops & kernels Changes to the opset and any new / changed kernel implementations labels Feb 7, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 7, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 1972c97
Pull Request resolved: #8257
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 7, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: c9d05c8
Pull Request resolved: #8257
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 11, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 4f87bdb
Pull Request resolved: #8257
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 11, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: f50384e
Pull Request resolved: #8257
Copy link
Contributor

@swolchok swolchok left a comment

Choose a reason for hiding this comment

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

make sure to fix the use of mul.out. op_name is also unused

// Reason for using alpha is becasuse handle_broadcast_elementwise
// is used for add and sub as well:
static constexpr const char op_name[] = "div.out";
ET_SWITCH_REALB_TYPES(out_type, ctx, "mul.out", CTYPE, [&]() {
Copy link
Contributor

Choose a reason for hiding this comment

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

s/mul/div/ here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch

@kimishpatel
Copy link
Contributor Author

@kimishpatel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 12, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 062635b
Pull Request resolved: #8257
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 12, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: bedf1ef
Pull Request resolved: #8257
@kimishpatel
Copy link
Contributor Author

@kimishpatel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 12, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 67bc2ab
Pull Request resolved: #8257
@kimishpatel
Copy link
Contributor Author

@kimishpatel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 13, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: ff509c7
Pull Request resolved: #8257
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 13, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 762829c
Pull Request resolved: #8257
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 15, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 299a278
Pull Request resolved: #8257
@kimishpatel
Copy link
Contributor Author

@kimishpatel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 15, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: f765411
Pull Request resolved: #8257
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 18, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 1f58db1
Pull Request resolved: #8257
@kimishpatel
Copy link
Contributor Author

@kimishpatel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 21, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 9b302a7
Pull Request resolved: #8257
@kimishpatel
Copy link
Contributor Author

@kimishpatel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

cc larryliu0820 manuelcandales

Differential Revision: [D69491815](https://our.internmc.facebook.com/intern/diff/D69491815)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 22, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: d7a4ae1
Pull Request resolved: #8257
@kimishpatel
Copy link
Contributor Author

@kimishpatel has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@kimishpatel kimishpatel merged commit a859a17 into gh/kimishpatel/157/base Feb 24, 2025
50 checks passed
@kimishpatel kimishpatel deleted the gh/kimishpatel/157/head branch February 24, 2025 02:39
swolchok pushed a commit that referenced this pull request Feb 24, 2025
Summary:
Similar to broadcast support in op_mul

Test Plan:
Tests added

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: d7a4ae1
Pull Request resolved: #8257

Co-authored-by: Kimish Patel <kimishpatel@fb.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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: kernels Issues related to kernel libraries and utilities, and code under kernels/ release notes: ops & kernels Changes to the opset and any new / changed kernel implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants