Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,12 @@ def test_constant_pad_nd__unsupported_paddings(input_shape, paddings, use_qat):
assert any(node.name == "aten_constant_pad_nd_default" for node in nodes)


@pytest.mark.xfail(reason="EIEX=855")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parametrize the test to it for legacy and new flow. Those two are distinct and the new mlir flow is experimental, hence the EIEX-855 is still valid.

Yes, eventually the EIEX-855 will be closed as outdated, once the mlir flow is mature enough but we are not yet there.
As we will do this for multiple operators define a mlir_flow as default parameter, like for qat - executorch/backends/nxp/tests/use_qat.py

def test_constant_pad_nd__delegation__formatless__supported_padding(use_qat):
input_shape = (2, 4, 6, 8) # Formatless -> the last dim (8) will be padded.
paddings = [0, 0, 1, 2, 3, 4] # The last dim is padded using the first 2 paddings.
model = ConstantPadNDModule(paddings)
exec_program = to_quantized_edge_program(
model, input_shape, use_qat=use_qat
model, input_shape, use_qat=use_qat, use_new_flow_neutron_c=True
).exported_program()

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


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

# Make sure the `pad` was delegated.
Expand Down
Loading