Skip to content

Implement unary_ufunc functions using elementwise_util #9386

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 126 commits into from
Jun 9, 2025

Conversation

swolchok
Copy link
Contributor

One less set of independent implementations to worry about going forward (e.g., we don't have to vectorize these separately from elementwise_util and they get all benefits of elementwise_util).

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@swolchok
Copy link
Contributor Author

swolchok commented Mar 19, 2025

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Mar 19, 2025

🔗 Helpful Links

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

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

⏳ 6 Pending, 1 Unrelated Failure

As of commit d14a503 with merge base 2dedc9e (image):

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.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Comment on lines +148 to +151
ScalarType compute_type = in.scalar_type() == ScalarType::Double
? ScalarType::Double
: ScalarType::Float;
ET_SWITCH_FLOAT_TYPES(compute_type, ctx, op_name, CTYPE_COMPUTE, [&] {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the only ET_SWITCH change remaining -- we are switching over the possible compute types, not the input/output types.

@swolchok swolchok temporarily deployed to upload-benchmark-results May 29, 2025 00:55 — with GitHub Actions Inactive
@swolchok swolchok temporarily deployed to upload-benchmark-results May 29, 2025 01:13 — with GitHub Actions Inactive
@swolchok swolchok temporarily deployed to upload-benchmark-results May 29, 2025 02:17 — with GitHub Actions Inactive
@swolchok swolchok temporarily deployed to upload-benchmark-results May 29, 2025 02:35 — with GitHub Actions Inactive
swolchok added 7 commits May 29, 2025 12:23
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
swolchok added a commit that referenced this pull request May 29, 2025
One less set of independent implementations to worry about going forward (e.g., we don't have to vectorize these separately from elementwise_util and they get all benefits of elementwise_util).

ghstack-source-id: 4f94633
ghstack-comment-id: 2735017402
Pull Request resolved: #9386
@swolchok swolchok marked this pull request as ready for review May 29, 2025 19:27
swolchok added 5 commits June 9, 2025 12:04
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jun 9, 2025
One less set of independent implementations to worry about going forward (e.g., we don't have to vectorize these separately from elementwise_util and they get all benefits of elementwise_util).

ghstack-source-id: 84604e1
ghstack-comment-id: 2735017402
Pull Request resolved: #9386
swolchok added 3 commits June 9, 2025 12:29
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
swolchok added a commit that referenced this pull request Jun 9, 2025
One less set of independent implementations to worry about going forward (e.g., we don't have to vectorize these separately from elementwise_util and they get all benefits of elementwise_util).

ghstack-source-id: 85b3067
ghstack-comment-id: 2735017402
Pull Request resolved: #9386
@swolchok
Copy link
Contributor Author

swolchok commented Jun 9, 2025

tests looking good; few stragglers but it's only llava and then one each of qnn/arm which shouldn't be affected

Base automatically changed from gh/swolchok/440/head to main June 9, 2025 20:27
@swolchok swolchok merged commit dffbd42 into main Jun 9, 2025
96 of 113 checks passed
@swolchok swolchok deleted the gh/swolchok/381/head branch June 9, 2025 20:28
JacobSzwejbka added a commit that referenced this pull request Jun 10, 2025
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants