Skip to content

NXP backend - added support for aten.abs using the new Neutron flow#19328

Open
novak-vaclav wants to merge 4 commits intopytorch:mainfrom
nxp-upstream:feature/EIEX-849-add-abs-support-using-new-neutron-flow
Open

NXP backend - added support for aten.abs using the new Neutron flow#19328
novak-vaclav wants to merge 4 commits intopytorch:mainfrom
nxp-upstream:feature/EIEX-849-add-abs-support-using-new-neutron-flow

Conversation

@novak-vaclav
Copy link
Copy Markdown
Contributor

@novak-vaclav novak-vaclav commented May 6, 2026

Summary

Added support for aten.abs using new Neutron flow.

Test plan

tests can be manually run using pytest -c /dev/null backends/nxp/tests/

cc @robert-kalmar @JakeStevens @digantdesai @MartinPavella

Copilot AI review requested due to automatic review settings May 6, 2026 08:48
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented May 6, 2026

🔗 Helpful Links

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

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

❌ 11 Awaiting Approval, 1 New Failure

As of commit 420ab94 with merge base 48a8d58 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

NEW FAILURE - The following job has failed:

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

@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 May 6, 2026
@novak-vaclav
Copy link
Copy Markdown
Contributor Author

@pytorchbot label "module: nxp"

@novak-vaclav
Copy link
Copy Markdown
Contributor Author

@pytorchbot label "release notes: nxp"

@pytorch-bot pytorch-bot Bot 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 May 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds aten.abs delegation support for the NXP backend when using the new Neutron-C (MLIR-based) flow, and expands test coverage to exercise both legacy and new-flow behavior.

Changes:

  • Added new-flow target support gating for aten.abs (currently limited to QDQ quantized int8/uint8) in the Abs node converter.
  • Refactored/extended test_abs_converter.py to split legacy vs new Neutron flow tests and add NSYS-based lower/run/compare coverage for the new flow.
  • Updated NXP copyright headers to include 2026.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
backends/nxp/tests/ir/converter/node_converter/test_abs_converter.py Splits legacy/new-flow tests and adds NSYS-based new-flow runtime validation for abs (including a conv+abs partitioning case).
backends/nxp/backend/ir/converter/node_converters/ops_converters/abs_converter.py Adds new-flow target support checks for abs based on QDQ quantized IO dtype (int8/uint8).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MartinPavella MartinPavella self-requested a review May 6, 2026 08:55
Copy link
Copy Markdown
Collaborator

@MartinPavella MartinPavella left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread backends/nxp/backend/ir/converter/node_converters/ops_converters/abs_converter.py Outdated
Comment thread backends/nxp/tests/ir/converter/node_converter/test_abs_converter.py Outdated
@novak-vaclav novak-vaclav force-pushed the feature/EIEX-849-add-abs-support-using-new-neutron-flow branch from ec37498 to 7f474aa Compare May 6, 2026 12:51
Copilot AI review requested due to automatic review settings May 6, 2026 13:39
@novak-vaclav novak-vaclav force-pushed the feature/EIEX-849-add-abs-support-using-new-neutron-flow branch from 7f474aa to 420ab94 Compare May 6, 2026 13:39
@novak-vaclav
Copy link
Copy Markdown
Contributor Author

Rebased onto #19327
Introduced random dataset creation in custom range
Improved robustness of tests by employing DetailedGraphVerifier

Please review @MartinPavella

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Comment on lines 446 to +447
if not _is_quantize(quantize_node := users[0]):
# Broken QDQ schema.

tflite_flatbuffers_model, io_formats = converter_spy.spy_return
exported_program: ExportedProgram = converter_spy.call_args.args[1]
tflite_flatbuffers_model, io_formats = converter_spy.spy_return
Comment on lines 27 to +33
Slice = exir_ops.edge.aten.slice.Tensor
SliceCopy = exir_ops.edge.aten.slice_copy.Tensor
Softmax = exir_ops.edge.aten._softmax.default
Squeeze = exir_ops.edge.aten.squeeze.default
SqueezeDim = exir_ops.edge.aten.squeeze.dim
SqueezeDims = exir_ops.edge.aten.squeeze.dims
Relu = exir_ops.edge.aten.relu.default
self.expected_delegated_ops = expected_delegated_ops
self.expected_non_delegated_ops = expected_non_delegated_ops

self.ops_to_ignore = ops_to_ignore or self.default_ops_to_ignore
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.

3 participants