-
Notifications
You must be signed in to change notification settings - Fork 649
NXP backend: Use zero point for quantized padding. #13576
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
base: main
Are you sure you want to change the base?
NXP backend: Use zero point for quantized padding. #13576
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/13576
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0f68cd2 with merge base 3dac421 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "module: nxp" "release notes: nxp" |
# be included in the computation! | ||
input_quantization = t_op.tmp_inputs[0].quantization | ||
pad_value = ( | ||
None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why None instead of 0 in non quantized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None
is the default value of the builder.create_pad_operator_before()
method's constant_value
parameter. This way, the actual default padding value (0
) is only defined in 1 place.
But it's hard to image that the default padding value would ever be changed, and using 0
here would make the code more understandable. I have no problem using 0
instead of None
if you prefer.
Summary
This PR fixes cases where padding with the value
0
was used for quantized operators. Now, zero point is used instead.Test plan
Unit tests provided.
cc @digantdesai @JakeStevens @robert-kalmar