Skip to content

Arm backend: Enable test_llama_tosa_BI and related fixes #10681

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
May 5, 2025

Conversation

mansnils
Copy link
Collaborator

@mansnils mansnils commented May 5, 2025

First problem solved by adding quantize of scalar_tensor: The where.self operator got a scalar_tensor input which was not quantized. This happened since the where.self quantization annotator uses the parent specs, which in this case where non-existing. Adding the quantization of scalar_tensor sorts this out.

Secondly when quantizing scalar_tensor the following assert triggers:
expecting kwargs for aten op IR to be empty
Hence setting scalar_tensor kwargs to {}.

Finally trying to quantize -inf fails for scalar_tensor nodes fails Fix it by adding the pass from qnn backend to replace -inf/inf. Hence adding new pass ReplaceInfValues.

Co-authored-by: Per Åstrand [email protected]
Co-authored-by: Måns Nilsson [email protected]

cc @digantdesai @freddan80 @per @zingo @oscarandersson8218

First problem solved by adding quantize of scalar_tensor:
The where.self operator got a scalar_tensor input which
was not quantized. This happened since the where.self quantization
annotator uses the parent specs, which in this case where
non-existing. Adding the quantization of scalar_tensor sorts this out.

Secondly when quantizing scalar_tensor the following assert triggers:
 expecting kwargs for aten op IR to be empty
Hence setting scalar_tensor kwargs to {}.

Finally trying to quantize -inf fails for scalar_tensor nodes fails
Fix it by adding the pass from qnn backend to replace -inf/inf.
Hence adding new pass ReplaceInfValues.

Co-authored-by: Per Åstrand <[email protected]>
Co-authored-by: Måns Nilsson <[email protected]>
Change-Id: I83b10c13de14fefcc7fd70108927f6b79f326ed8
@mansnils mansnils requested a review from digantdesai as a code owner May 5, 2025 12:52
@mansnils mansnils added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk topic: not user facing labels May 5, 2025
Copy link

pytorch-bot bot commented May 5, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

⏳ No Failures, 2 Pending

As of commit 0cdb41c with merge base cd3b53d (image):
💚 Looks good so far! There are no failures yet. 💚

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 May 5, 2025
@mansnils mansnils merged commit 51befee into pytorch:main May 5, 2025
175 checks passed
jhelsby pushed a commit to jhelsby/executorch that referenced this pull request May 9, 2025
First problem solved by adding quantize of scalar_tensor: The where.self
operator got a scalar_tensor input which was not quantized. This
happened since the where.self quantization annotator uses the parent
specs, which in this case where non-existing. Adding the quantization of
scalar_tensor sorts this out.

Secondly when quantizing scalar_tensor the following assert triggers:
 expecting kwargs for aten op IR to be empty
Hence setting scalar_tensor kwargs to {}.

Finally trying to quantize -inf fails for scalar_tensor nodes fails Fix
it by adding the pass from qnn backend to replace -inf/inf. Hence adding
new pass ReplaceInfValues.

Co-authored-by: Per Åstrand <[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.

4 participants