Skip to content
Closed
Show file tree
Hide file tree
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
17 changes: 2 additions & 15 deletions backends/arm/test/ops/test_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,19 +242,6 @@ def forward(self, x):
("two_conv2d", two_conv2d),
]

# Expected fails on Ethos-U55/U65. This is a known limitation.
# Check: https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ethos-u-vela/+/refs/heads/main/SUPPORTED_OPS.md
# IFM Tensor batch size must be 1 - [FULLY_CONNECTED, RESHAPE, SHAPE, SLICE, SOFTMAX, SPLIT, SPLIT_V, SQUEEZE, STRIDED_SLICE, UNPACK]
testsuite_u55 = testsuite.copy()
testsuite_u55.remove(("2x2_3x2x40x40_nobias", conv2d_2x2_3x2x40x40_nobias))
testsuite_u55.remove(("5x5_3x2x128x128_st1", conv2d_5x5_3x2x128x128_st1))

# Fails when enabling CompileSpec.set_quantize_io(True). MLETORCH-191.
testsuite_u55.remove(("2x2_1x1x14x13_st2_needs_adjust_pass", conv2d_2x2_1x1x14x13_st2))
testsuite_u55.remove(
("conv2d_5x5_1x3x14x15_st3_pd1_needs_adjust_pass", conv2d_5x5_1x3x14x15_st3_pd1)
)


class TestConv2D(unittest.TestCase):
"""Tests Conv2D, both single ops and multiple Convolutions in series."""
Expand Down Expand Up @@ -327,15 +314,15 @@ def test_conv2d_tosa_MI(self, test_name, model):
def test_conv2d_tosa_BI(self, test_name, model):
self._test_conv2d_tosa_BI_pipeline(model, model.get_inputs())

@parameterized.expand(testsuite_u55)
@parameterized.expand(testsuite)
def test_conv2d_u55_BI(self, test_name, model):
self._test_conv2d_ethosu_BI_pipeline(
common.get_u55_compile_spec(permute_memory_to_nhwc=True),
model,
model.get_inputs(),
)

@parameterized.expand(testsuite_u55)
@parameterized.expand(testsuite)
def test_conv2d_u85_BI(self, test_name, model):
self._test_conv2d_ethosu_BI_pipeline(
common.get_u85_compile_spec(permute_memory_to_nhwc=True),
Expand Down
20 changes: 1 addition & 19 deletions backends/arm/test/ops/test_depthwise_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,6 @@
("two_dw_conv2d", two_dw_conv2d),
]

# Expected fails on Ethos-U55/U65. This is a known limitation.
# Check: https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ethos-u-vela/+/refs/heads/main/SUPPORTED_OPS.md
# For depth multipliers > 1, IFM channels must be 1 and OFM channels must be
# equal to the depth multiplier
# and
# depthwise_multiplier = out_channels / in_channels
testsuite_u55 = testsuite.copy()
testsuite_u55.remove(("2x2_1x6x4x4_gp6_st1", dw_conv2d_2x2_1x6x4x4_gp6_st1))
testsuite_u55.remove(("3x3_1x4x256x256_gp4_st1", dw_conv2d_3x3_1x4x256x256_gp4_st1))
testsuite_u55.remove(("3x3_2x8x198x198_gp8_st3", dw_conv2d_3x3_2x8x198x198_gp8_st3))
testsuite_u55.remove(
("3x3_1x4x256x256_gp4_nobias", dw_conv2d_3x3_1x4x256x256_gp4_nobias)
)
testsuite_u55.remove(("two_dw_conv2d", two_dw_conv2d))

# Fails when enabling CompileSpec.set_quantize_io(True). MLETORCH-191.
testsuite_u55.remove(("3x3_1x3x256x256_gp3_st1", dw_conv2d_3x3_1x3x256x256_gp3_st1))


class TestDepthwiseConv2D(unittest.TestCase):
"""Tests Conv2D where groups == in_channels and out_channels = K * in_channels. This
Expand Down Expand Up @@ -204,7 +186,7 @@ def test_dw_conv2d_tosa_MI(self, test_name: str, model: torch.nn.Module):
def test_dw_conv2d_tosa_BI(self, test_name: str, model: torch.nn.Module):
self._test_dw_conv2d_tosa_BI_pipeline(model, model.get_inputs())

@parameterized.expand(testsuite_u55, skip_on_empty=True)
@parameterized.expand(testsuite, skip_on_empty=True)
def test_dw_conv2d_u55_BI(
self, test_name: str, model: torch.nn.Module, set_quantize_io: bool = False
):
Expand Down
Loading