Skip to content
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 support for upsample_nearest2d op in the Arm backend #5746

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Tessil
Copy link
Collaborator

@Tessil Tessil commented Sep 30, 2024

Add support for the torch.ops.aten.upsample_nearest2d.vec operator in the Arm backend.

The torch.ops.aten.upsample_nearest2d.vec operator is added to the operators to not decompose so that it can directly be legalized to a tosa.resize operator.

Change-Id: Id0b742214e5432957b2f573b4218f09a4d9734e4

Copy link

pytorch-bot bot commented Sep 30, 2024

🔗 Helpful Links

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

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

❌ 4 New Failures, 1 Cancelled Job

As of commit 4fb9443 with merge base 03b1ef2 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

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

@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 Sep 30, 2024
@pytorch-bot pytorch-bot bot added the partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm label Sep 30, 2024
@Tessil
Copy link
Collaborator Author

Tessil commented Sep 30, 2024

@pytorchbot label ciflow/trunk

Copy link

pytorch-bot bot commented Sep 30, 2024

Can't add following labels to PR: ciflow/trunk. Please ping one of the reviewers for help.

Copy link

pytorch-bot bot commented Sep 30, 2024

Please seek CI approval before scheduling CIFlow labels



test_data_suite = [
# (test_name, test_data, size, scale_factor, compare_outputs)
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️ these test. Awesome!

backends/arm/test/tester/arm_tester.py Show resolved Hide resolved
@digantdesai
Copy link
Contributor

Please rebase?

@facebook-github-bot
Copy link
Contributor

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

@Tessil
Copy link
Collaborator Author

Tessil commented Oct 4, 2024

Thanks for the review. I rebased the change and fixed the conflicts.

@Tessil Tessil force-pushed the toupstream/upsample_nearest2d branch from 5c042d3 to 8f769fe Compare October 8, 2024 09:27
@facebook-github-bot
Copy link
Contributor

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

@digantdesai
Copy link
Contributor

Internal checker found these type issues, can you please fix and rebase? Thanks.

Found type errors!
executorch/backends/arm/tosa_utils.py:356:16 Undefined or invalid type [11]: Annotation `torch.tensor` is not defined as a type.
executorch/backends/arm/tosa_utils.py:373:21 Incompatible parameter type [6]: In call `torch._C._VariableFunctions.all`, for 1st positional argument, expected `Tensor` but got `bool`.
executorch/backends/arm/tosa_utils.py:374:21 Incompatible parameter type [6]: In call `torch._C._VariableFunctions.all`, for 1st positional argument, expected `Tensor` but got `bool`.

@Tessil Tessil force-pushed the toupstream/upsample_nearest2d branch from 8f769fe to cf7310c Compare October 9, 2024 14:53
@Tessil
Copy link
Collaborator Author

Tessil commented Oct 9, 2024

Thanks, the last change should fix this.

@facebook-github-bot
Copy link
Contributor

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

@digantdesai
Copy link
Contributor

still seems like a type errors on op_upsample_nearest2d.py:48 get_resize_parameters for 3rd arg expected ResizeMode but got int. Sorry for the delay.

@facebook-github-bot
Copy link
Contributor

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

@digantdesai
Copy link
Contributor

Also rebase?

@Tessil Tessil force-pushed the toupstream/upsample_nearest2d branch from cf7310c to 533d9db Compare October 17, 2024 09:11
@Tessil
Copy link
Collaborator Author

Tessil commented Oct 17, 2024

Thanks, I rebased and fixed the issue.

@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

@digantdesai
Copy link
Contributor

Sorry rebase?

@Tessil Tessil force-pushed the toupstream/upsample_nearest2d branch from 8eea28f to 675d0ac Compare October 23, 2024 15:00
@Tessil
Copy link
Collaborator Author

Tessil commented Oct 23, 2024

@digantdesai Thanks, done

@facebook-github-bot
Copy link
Contributor

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

@digantdesai
Copy link
Contributor

If CI is not green, please make it a Draft PR

@Tessil
Copy link
Collaborator Author

Tessil commented Oct 28, 2024

The failure doesn't seem to be related to this PR as it's the new test_var.py tests introduced during the rebase from upstream that are failing. I'll check internally if these can be fixed in another PR.

@facebook-github-bot
Copy link
Contributor

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

@digantdesai
Copy link
Contributor

Rebase please?

Change-Id: Id0b742214e5432957b2f573b4218f09a4d9734e4
@Tessil Tessil force-pushed the toupstream/upsample_nearest2d branch from 675d0ac to 4fb9443 Compare November 6, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants