diff options
author | Johan Gunnarsson <johan.gunnarsson@arm.com> | 2023-09-07 12:28:28 +0200 |
---|---|---|
committer | Johan Alfven <johan.alfven@arm.com> | 2023-09-14 07:49:46 +0000 |
commit | 7ccc583c7cf36fc8bb8391594ee818263247a995 (patch) | |
tree | 66129d0442bf7b7fe111ab22c4469c61a6684e1e /ethosu/vela | |
parent | f0cb1abcab287a282a238d660089e23bd0c93c23 (diff) | |
download | ethos-u-vela-7ccc583c7cf36fc8bb8391594ee818263247a995.tar.gz |
MLBEDSW-8003: Limit fixup_pool_strides to AvgPool and MaxPool
This fixup is not relevant for Resize ops.
Signed-off-by: Johan Gunnarsson <johan.gunnarsson@arm.com>
Change-Id: I81b9d3c8a6dd820b1e5d747d754100282b93c641
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/tflite_graph_optimiser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index 51078718..f686feaf 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -2341,7 +2341,7 @@ def convert_shape_op_to_constant_tensor(op: Operation, arch, nng): def fixup_pool_strides(op: Operation, arch, nng): """Fixup Pool strides when the kernel size is equal to IFM shape. Stride is then irrelevant.""" - if op.type.is_pool_op(): + if op.type in (Op.AvgPool, Op.MaxPool, Op.QuantizedAvgPool, Op.QuantizedMaxPool): ifm, _ = op.get_ifm_ofm() kernel_w, kernel_h = op.get_kernel_size() if kernel_w == ifm.shape[2] and kernel_h == ifm.shape[1]: |