Skip to content

Arm backend: Change _is_ok_for_quantization to support output check #9795

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 1 commit into from
Apr 1, 2025

Conversation

Sebastian-Larsson
Copy link
Collaborator

@Sebastian-Larsson Sebastian-Larsson commented Apr 1, 2025

_is_ok_for_quantization now checks the node itself as well to verify that the node can be quantized. Previously it was only checked by looking at the inputs to the node.

This led to TestSplit failing, which is fixed with the change to is_non_float_tensor in arm_quantizer_utils, which now handles when node.meta["val"] is a list of FakeTensor. It traverses the list and checks if any of the elements are not a FakeTensor. If one element is not a FakeTensor the function will return True.

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

_is_ok_for_quantization now checks the node itself as well to verify
that the node can be quantized. Previously it was only checked by
looking at the inputs to the node.

This led to TestSplit failing, which is fixed with the change to
`is_non_float_tensor` in `arm_quantizer_utils`, which now handles when
node.meta["val"] is a `list` of `FakeTensor`. It traverses the list and
checks if any of the elements are **not** a `FakeTensor`. If one element
is not a `FakeTensor` the function will return `True`.

Change-Id: I898cfea5d02a185fbfa30b18a013123c6d3670a5
Signed-off-by: Sebastian Larsson <[email protected]>
Copy link

pytorch-bot bot commented Apr 1, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 69c7124 with merge base 77c35f5 (image):

NEW FAILURE - The following job has failed:

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 Apr 1, 2025
@Sebastian-Larsson Sebastian-Larsson added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels Apr 1, 2025
@Sebastian-Larsson Sebastian-Larsson requested a review from zingo April 1, 2025 12:27
@Sebastian-Larsson
Copy link
Collaborator Author

From what I can tell the CI failure is unrelated.

@zingo zingo merged commit bc3d437 into pytorch:main Apr 1, 2025
165 of 169 checks passed
kirklandsign pushed a commit that referenced this pull request Apr 11, 2025
…9795)

_is_ok_for_quantization now checks the node itself as well to verify
that the node can be quantized. Previously it was only checked by
looking at the inputs to the node.

This led to TestSplit failing, which is fixed with the change to
`is_non_float_tensor` in `arm_quantizer_utils`, which now handles when
node.meta["val"] is a `list` of `FakeTensor`. It traverses the list and
checks if any of the elements are **not** a `FakeTensor`. If one element
is not a `FakeTensor` the function will return `True`.

Signed-off-by: Sebastian Larsson <[email protected]>
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 topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants