NXP backend: Add conversion and quantization support for dim_order_ops._clone_dim_order.default#14535
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/14535
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 5647c3e with merge base 0b748bf ( 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" |
backends/nxp/tests/executors.py
Outdated
|
|
||
| def graph_contains_any_of_ops(graph: Graph, ops: list) -> bool: | ||
| return any(node.target in ops for node in graph.nodes) | ||
| return graph_contains_any(graph, condition=lambda n: n in ops) |
There was a problem hiding this comment.
Shouldn't this be:
return graph_contains_any(graph, condition=lambda n: hasattr(n, "target") and n.target in ops)?
backends/nxp/tests/executors.py
Outdated
|
|
||
|
|
||
| def graph_contains_any(graph: Graph, condition: Callable[[Node], bool]) -> bool: | ||
| return any(condition(node.target) for node in graph.nodes) |
There was a problem hiding this comment.
This should be:
return any(condition(node) for node in graph.nodes)or if you prefer:
return any(map(condition, graph.nodes))| ] | ||
|
|
||
| quantized_program = to_quantized_edge_program(model, input_shape).exported_program() | ||
| def target_can_be_clone(node): |
|
|
||
| edge_program = to_edge_program(model, input_shape).exported_program() | ||
|
|
||
| has_clone = graph_contains_any( |
There was a problem hiding this comment.
Nit:
You can use the graph_contains_any_of_ops() here (once it's fixed).
|
Please take a look at the failing Neutron tests. |
edb2d3f to
a56732e
Compare
|
Both fails seems unrelated to this PR while one of them was already failing in our previous PRs. |
a56732e to
e6597c2
Compare
roman-janik-nxp
left a comment
There was a problem hiding this comment.
Please update and rebase on new main.
backends/nxp/tests/ir/converter/node_converter/test_clone_converter.py
Outdated
Show resolved
Hide resolved
backends/nxp/tests/ir/converter/node_converter/test_clone_converter.py
Outdated
Show resolved
Hide resolved
backends/nxp/tests/ir/converter/node_converter/test_clone_converter.py
Outdated
Show resolved
Hide resolved
…s._clone_dim_order.default
e6597c2 to
5647c3e
Compare
That is done. ✅ |
…s._clone_dim_order.default (pytorch#14535) ### Summary - Adds support for conversion and quantization of `dim_order_ops._clone_dim_order.default` operator and fixes problems with some variations of `nn.Dropout`. - Adds more robust test cases for clone operators. ### Test plan All changes should be covered by unit tests. cc @robert-kalmar @JakeStevens @digantdesai
Summary
dim_order_ops._clone_dim_order.defaultoperator and fixes problems with some variations ofnn.Dropout.Test plan
All changes should be covered by unit tests.
cc @robert-kalmar @JakeStevens @digantdesai