NXP backend: Enable Neg with new Neutron flow#20451
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20451
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 2 New Failures, 3 Unrelated FailuresAs of commit 6a6508a with merge base 252f57c ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
8bb5038 to
6a6508a
Compare
| ) | ||
| class TestNeg: | ||
| def test__basic_nsys_inference(self, mocker, request, use_qat): | ||
| # Use 256 elements so that, after quantization to int8, the input can |
There was a problem hiding this comment.
Very nice method for thorough testing! 👌
| intermediate_ep = converter_spy.call_args.args[1] | ||
|
|
||
| # Make sure the tested program contains the `neg`. | ||
| assert graph_contains_any_of_ops(intermediate_ep.graph, [Neg]) |
There was a problem hiding this comment.
What is the purpose of this check? The DetailedGraphVerifier already checks that the aten.neg is in the edge model and it's selected for delegation to Neutron.
| def __init__(self): | ||
| super().__init__() | ||
| self.conv = torch.nn.Conv2d(3, 3, 1) | ||
| self.conv = torch.nn.Conv2d(4, 4, 1) |
There was a problem hiding this comment.
It seems weird to change to definition of the model instead of using 3 channels in the test. Were the 4 channels important?
| tflite_input_preprocess=ToChannelLastPreprocess(), | ||
| tflite_output_preprocess=ToChannelFirstPreprocess(), | ||
| ) | ||
| class TestNeg: |
There was a problem hiding this comment.
You removed tests with multiple different input shapes, and left only 2, both with multiples of num_macs. Why don't you test with more shapes?
Summary
Add tests verifying correct support for
negby the Neutron backend using the new Neutron MLIR flow.Test plan
Unit tests provided.
cc @robert-kalmar @JakeStevens @digantdesai @rascani