-
Notifications
You must be signed in to change notification settings - Fork 754
NXP backend: added aten.mul support #15971
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
NXP backend: added aten.mul support #15971
Conversation
🔗 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 FailureAs of commit b25bcdd with merge base 488d761 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "release notes: nxp" |
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.
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
MulTensorConverterto convertaten.mul.Tensoroperations to TensorFlow Lite IR - Added
MulTensorPatternquantization 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.
backends/nxp/backend/ir/converter/node_converters/ops_converters/mul_tensor_converter.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
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.
backends/nxp/backend/ir/converter/node_converters/ops_converters/mul_tensor_converter.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…rs/mul_tensor_converter.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
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
left a comment
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.
I only have small suggestions for improvements. Please have a look at them.
Otherwise, well done 👍🏻
backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py
Outdated
Show resolved
Hide resolved
backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py
Outdated
Show resolved
Hide resolved
backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py
Outdated
Show resolved
Hide resolved
backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py
Outdated
Show resolved
Hide resolved
backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py
Show resolved
Hide resolved
|
A general tip: |
I had a discussion about it with @robert-kalmar and in the next PRs, I will try to keep a more structured commit history. |
|
All issues found by @MartinPavella are fixed. |
|
Please update the branch to enable the tests. |
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.
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.
backends/nxp/tests/ir/converter/node_converter/test_mul_tensor_converter.py
Outdated
Show resolved
Hide resolved
backends/nxp/backend/ir/converter/node_converters/ops_converters/mul_tensor_converter.py
Show resolved
Hide resolved
…_converter.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
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.
|
@pytorchbot label "module: nxp" |
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