Skip to content

Commit 920b493

Browse files
NXP backend: Use new Neutron flow for failing constant pad tests. (#19024)
### Summary In Neutron SW SDK 3.1.0, some edge cases of the constant pad operator are no longer supported by the old flow. Affected tests now use the new flow where the pad is supported. (Only the last commit is relevant) ### Test plan Unit tests provided. cc @robert-kalmar @JakeStevens @digantdesai
1 parent 3a9230d commit 920b493

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

backends/nxp/tests/ir/converter/node_converter/test_constant_pad_nd_converter.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,12 @@ def test_constant_pad_nd__unsupported_paddings(input_shape, paddings, use_qat):
163163
assert any(node.name == "aten_constant_pad_nd_default" for node in nodes)
164164

165165

166-
@pytest.mark.xfail(reason="EIEX=855")
167166
def test_constant_pad_nd__delegation__formatless__supported_padding(use_qat):
168167
input_shape = (2, 4, 6, 8) # Formatless -> the last dim (8) will be padded.
169168
paddings = [0, 0, 1, 2, 3, 4] # The last dim is padded using the first 2 paddings.
170169
model = ConstantPadNDModule(paddings)
171170
exec_program = to_quantized_edge_program(
172-
model, input_shape, use_qat=use_qat
171+
model, input_shape, use_qat=use_qat, use_new_flow_neutron_c=True
173172
).exported_program()
174173

175174
# Make sure the `pad` was delegated.
@@ -192,13 +191,12 @@ def test_constant_pad_nd__delegation__formatless__unsupported_padding(use_qat):
192191
)
193192

194193

195-
@pytest.mark.xfail(reason="Regression in Neutron SW 3.0.1 (AIR-14264)", strict=True)
196194
def test_constant_pad_nd__delegation__channels_first__supported_padding(use_qat):
197195
input_shape = (2, 4, 6, 8) # Channels first -> the second dim (4) will be padded.
198196
paddings = [1, 2, 3, 4, 0, 0] # The second dim is padded using the paddings[4:6].
199197
model = ConstantPadNDConvModule(paddings)
200198
exec_program = to_quantized_edge_program(
201-
model, input_shape, use_qat=use_qat
199+
model, input_shape, use_qat=use_qat, use_new_flow_neutron_c=True
202200
).exported_program()
203201

204202
# Make sure the `pad` was delegated.

0 commit comments

Comments
 (0)