Skip to content

Conversation

@novak-vaclav
Copy link
Contributor

@novak-vaclav novak-vaclav commented Nov 25, 2025

Summary

adds support for aten.mul operator

Test plan

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

cc @robert-kalmar @JakeStevens @digantdesai

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 25, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit b25bcdd with merge base 488d761 (image):

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 Nov 25, 2025
@novak-vaclav
Copy link
Contributor Author

@pytorchbot label "release notes: nxp"

@pytorch-bot pytorch-bot bot added the release notes: nxp Changes to the NXP Neutron backend delegate label Nov 25, 2025
@novak-vaclav novak-vaclav marked this pull request as ready for review November 25, 2025 10:44
Copilot AI review requested due to automatic review settings November 25, 2025 10:44
Copy link
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

This PR adds support for the aten.mul (element-wise multiplication) operator to the NXP backend. The implementation includes quantization patterns, converter logic, and comprehensive test coverage.

Key changes:

  • Implemented MulTensorConverter to convert aten.mul.Tensor operations to TensorFlow Lite IR
  • Added MulTensorPattern quantization pattern with fixed quantization parameters
  • Comprehensive test suite covering various input shapes, broadcasting scenarios, and edge cases

Reviewed changes

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

Show a summary per file
File Description
backends/nxp/tests/models.py Added three test model classes for mul operation testing
backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py Comprehensive test suite for mul tensor converter with multiple scenarios
backends/nxp/quantizer/patterns.py Added MulTensorPattern class for quantization
backends/nxp/quantizer/neutron_quantizer.py Registered MulTensorPattern in the quantizer
backends/nxp/neutron_partitioner.py Registered MulTensorConverter in the partitioner
backends/nxp/backend/ir/converter/node_converters/ops_converters/mul_tensor_converter.py Core converter implementation with target support validation
backends/nxp/backend/ir/converter/node_converters/ops_converters/__init__.py Added MulTensorConverter to module exports
backends/nxp/backend/edge_program_converter.py Registered converter in edge program converter

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 25, 2025 10:47
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
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 8 out of 8 changed files in this pull request and generated 3 comments.


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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 25, 2025 10:53
…rs/mul_tensor_converter.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
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 8 out of 8 changed files in this pull request and generated no new comments.


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

@novak-vaclav novak-vaclav marked this pull request as draft November 25, 2025 12:52
@novak-vaclav novak-vaclav marked this pull request as ready for review November 25, 2025 13:46
@MartinPavella MartinPavella self-requested a review November 25, 2025 14:23
Copy link
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.

I only have small suggestions for improvements. Please have a look at them.
Otherwise, well done 👍🏻

@MartinPavella
Copy link
Collaborator

A general tip:
We prefer to use rebase instead of merge to keep up with the base branch (main). It keeps the history nicer, and the lintrunner runs significantly faster.

@novak-vaclav
Copy link
Contributor Author

A general tip: We prefer to use rebase instead of merge to keep up with the base branch (main). It keeps the history nicer, and the lintrunner runs significantly faster.

I had a discussion about it with @robert-kalmar and in the next PRs, I will try to keep a more structured commit history.

@novak-vaclav
Copy link
Contributor Author

All issues found by @MartinPavella are fixed.

@MartinPavella
Copy link
Collaborator

Please update the branch to enable the tests.

Copilot AI review requested due to automatic review settings December 8, 2025 09:24
Copy link
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 8 out of 8 changed files in this pull request and generated 3 comments.


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

…_converter.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 8, 2025 09:33
Copy link
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 8 out of 8 changed files in this pull request and generated no new comments.


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

@MartinPavella MartinPavella added the module: nxp Issues related to NXP Neutron NPU delegation and code under backends/nxp/ label Dec 8, 2025
@novak-vaclav
Copy link
Contributor Author

@pytorchbot label "module: nxp"

@MartinPavella MartinPavella merged commit 670bc11 into pytorch:main Dec 9, 2025
149 of 150 checks passed
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