Skip to content

Commit 09f13c0

Browse files
zingofacebook-github-bot
authored andcommitted
Arm backend: Updated depthwise/conv2d test lists for Ethos Ux5 (pytorch#5625)
Summary: Now when more things is supported all current tests works so lets enable them again. Pull Request resolved: pytorch#5625 Reviewed By: digantdesai Differential Revision: D63637354 Pulled By: mergennachin fbshipit-source-id: 65721fa28ea378488544ffba48901428aeb01c39
1 parent b71926f commit 09f13c0

File tree

2 files changed

+3
-34
lines changed

2 files changed

+3
-34
lines changed

backends/arm/test/ops/test_conv.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -242,19 +242,6 @@ def forward(self, x):
242242
("two_conv2d", two_conv2d),
243243
]
244244

245-
# Expected fails on Ethos-U55/U65. This is a known limitation.
246-
# Check: https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ethos-u-vela/+/refs/heads/main/SUPPORTED_OPS.md
247-
# IFM Tensor batch size must be 1 - [FULLY_CONNECTED, RESHAPE, SHAPE, SLICE, SOFTMAX, SPLIT, SPLIT_V, SQUEEZE, STRIDED_SLICE, UNPACK]
248-
testsuite_u55 = testsuite.copy()
249-
testsuite_u55.remove(("2x2_3x2x40x40_nobias", conv2d_2x2_3x2x40x40_nobias))
250-
testsuite_u55.remove(("5x5_3x2x128x128_st1", conv2d_5x5_3x2x128x128_st1))
251-
252-
# Fails when enabling CompileSpec.set_quantize_io(True). MLETORCH-191.
253-
testsuite_u55.remove(("2x2_1x1x14x13_st2_needs_adjust_pass", conv2d_2x2_1x1x14x13_st2))
254-
testsuite_u55.remove(
255-
("conv2d_5x5_1x3x14x15_st3_pd1_needs_adjust_pass", conv2d_5x5_1x3x14x15_st3_pd1)
256-
)
257-
258245

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

330-
@parameterized.expand(testsuite_u55)
317+
@parameterized.expand(testsuite)
331318
def test_conv2d_u55_BI(self, test_name, model):
332319
self._test_conv2d_ethosu_BI_pipeline(
333320
common.get_u55_compile_spec(permute_memory_to_nhwc=True),
334321
model,
335322
model.get_inputs(),
336323
)
337324

338-
@parameterized.expand(testsuite_u55)
325+
@parameterized.expand(testsuite)
339326
def test_conv2d_u85_BI(self, test_name, model):
340327
self._test_conv2d_ethosu_BI_pipeline(
341328
common.get_u85_compile_spec(permute_memory_to_nhwc=True),

backends/arm/test/ops/test_depthwise_conv.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,6 @@
113113
("two_dw_conv2d", two_dw_conv2d),
114114
]
115115

116-
# Expected fails on Ethos-U55/U65. This is a known limitation.
117-
# Check: https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ethos-u-vela/+/refs/heads/main/SUPPORTED_OPS.md
118-
# For depth multipliers > 1, IFM channels must be 1 and OFM channels must be
119-
# equal to the depth multiplier
120-
# and
121-
# depthwise_multiplier = out_channels / in_channels
122-
testsuite_u55 = testsuite.copy()
123-
testsuite_u55.remove(("2x2_1x6x4x4_gp6_st1", dw_conv2d_2x2_1x6x4x4_gp6_st1))
124-
testsuite_u55.remove(("3x3_1x4x256x256_gp4_st1", dw_conv2d_3x3_1x4x256x256_gp4_st1))
125-
testsuite_u55.remove(("3x3_2x8x198x198_gp8_st3", dw_conv2d_3x3_2x8x198x198_gp8_st3))
126-
testsuite_u55.remove(
127-
("3x3_1x4x256x256_gp4_nobias", dw_conv2d_3x3_1x4x256x256_gp4_nobias)
128-
)
129-
testsuite_u55.remove(("two_dw_conv2d", two_dw_conv2d))
130-
131-
# Fails when enabling CompileSpec.set_quantize_io(True). MLETORCH-191.
132-
testsuite_u55.remove(("3x3_1x3x256x256_gp3_st1", dw_conv2d_3x3_1x3x256x256_gp3_st1))
133-
134116

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

207-
@parameterized.expand(testsuite_u55, skip_on_empty=True)
189+
@parameterized.expand(testsuite, skip_on_empty=True)
208190
def test_dw_conv2d_u55_BI(
209191
self, test_name: str, model: torch.nn.Module, set_quantize_io: bool = False
210192
):

0 commit comments

Comments
 (0)