Skip to content

NXP backend: Use a quantized dataset for testing operators where a single-bit error is expected.#20689

Open
MartinPavella wants to merge 1 commit into
pytorch:mainfrom
nxp-upstream:nxg01483/EIEX-931-update-tests-with-single-bit-error-to-use-quantized-dataset
Open

NXP backend: Use a quantized dataset for testing operators where a single-bit error is expected.#20689
MartinPavella wants to merge 1 commit into
pytorch:mainfrom
nxp-upstream:nxg01483/EIEX-931-update-tests-with-single-bit-error-to-use-quantized-dataset

Conversation

@MartinPavella

@MartinPavella MartinPavella commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Use a quantized dataset for testing operators where a single-bit error is expected. With a float dataset, the error depended on the output quantization. With a quantized dataset, the tolerance is always 1, regardless of quantization.

Test plan

Tested by existing nxp tests.
./backends/nxp/run_unittests.sh

cc @robert-kalmar @JakeStevens @digantdesai @rascani

@MartinPavella MartinPavella self-assigned this Jul 2, 2026
@MartinPavella MartinPavella added module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate labels Jul 2, 2026
@meta-cla meta-cla 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 Jul 2, 2026
@pytorch-bot

pytorch-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 71be8b9 with merge base 3bd4748 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@novak-vaclav novak-vaclav left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, good job 👌

Nit: I was just thinking that a global decorator instead of setting remove_quant_io_ops everytime might be more beautiful, but I will leave it up to you:

from functools import wraps

def allow_one_bit_error(func):
    @wraps(func)
    def wrapper(self, *args, **kwargs):
        self.remove_quant_io_ops = True
        return func(self, *args, **kwargs)
    return wrapper

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. module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ release notes: nxp Changes to the NXP Neutron backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants