diff options
author | Raul Farkas <raul.farkas@arm.com> | 2023-01-30 12:58:46 +0000 |
---|---|---|
committer | Raul Farkas <raul.farkas@arm.com> | 2023-05-10 13:34:42 +0100 |
commit | 10d6b3b3fa594b9aca4a72f002acea9f927f9c60 (patch) | |
tree | 3b5f71ad590c81e53bca82ab2ffb20196d2408e2 /ethosu/vela/test | |
parent | 69782af3ff2cda96dff09ad66799b3ac8f16c19d (diff) | |
download | ethos-u-vela-10d6b3b3fa594b9aca4a72f002acea9f927f9c60.tar.gz |
MLBEDSW-7283: Add opt cases for strided CONV2D
* Implement a general optimization solution for strided CONV2D that
supports a stride_w with no upper bound.
* Implement filter zero padding to allow for optimization in those cases
in which the filter width is not divisible by the stride width.
E.g.: Filter width = 8, stride width = 3 ->
Filter width = 8 + 1 (0 padding) = 9, stride width = 3
* Implement partial optimization to reduce the stride to hw supported
strides (i.e. 2 and 3) when optimizing to reach a stride = 1 is not
possible due to the IFM width not being divisible by the stride width.
* Implement optimization for when SAME padding is used. If the pre-opt
and post-opt padding do not match, add zero padding to the filter so
that the post-opt IFM padding matches.
Change-Id: Ia66b0d107281fa9993f6bf4d0c26627ee743253b
Signed-off-by: Raul Farkas <raul.farkas@arm.com>
Diffstat (limited to 'ethosu/vela/test')
-rw-r--r-- | ethosu/vela/test/test_tflite_supported_operators.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ethosu/vela/test/test_tflite_supported_operators.py b/ethosu/vela/test/test_tflite_supported_operators.py index 74dd3bf2..cedf87af 100644 --- a/ethosu/vela/test/test_tflite_supported_operators.py +++ b/ethosu/vela/test/test_tflite_supported_operators.py @@ -109,15 +109,15 @@ def test_constraint_conv_pass(): "stride_w, stride_h, supported", [ [0, 20, False], - [4, 1, True], - [4, 2, True], - [2, 2, True], - [4, 4, False], + [20, 0, False], + [4, 3, True], [4, 5, False], - [5, 4, False], + [4, 9, False], [3, 3, True], [1, 1, True], - [2, 4, False], + [20, 2, True], + [6, 3, True], + [8, 1, True], ], ) def test_constraint_stride_range(stride_w: int, stride_h: int, supported: bool): |