aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/pass_packing.py
diff options
context:
space:
mode:
authorTim Hall <tim.hall@arm.com>2022-07-21 11:46:03 +0100
committertim.hall <tim.hall@arm.com>2022-07-23 16:56:07 +0000
commit885033b5bf2f6513b438f273b2bc71964f0c6c59 (patch)
treec52a6c5bbe1c6f4295aa94206b80a37a60fcf182 /ethosu/vela/pass_packing.py
parent47c7636586be265eed9e352e6ad4c090a02fb31f (diff)
downloadethos-u-vela-885033b5bf2f6513b438f273b2bc71964f0c6c59.tar.gz
MLBEDSW-4157: Add RESIZE_NEAREST_NEIGHBOR support
- Changed ResizeBilinear to support ResizeNearestNeighbor as well for 1x1 IFM, IFM equal OFM, and non-align corners - Added support for ResizeNearestNeighbor with align corners by converting to a DepthwiseConv - Updated supported operator unit tests - Added is_resize() helper function and some associated refactoring Signed-off-by: Tim Hall <tim.hall@arm.com> Change-Id: Id5bdf2a25e8aa6a4f28b7236250abf768141ce37
Diffstat (limited to 'ethosu/vela/pass_packing.py')
-rw-r--r--ethosu/vela/pass_packing.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ethosu/vela/pass_packing.py b/ethosu/vela/pass_packing.py
index 050b0965..988e52e6 100644
--- a/ethosu/vela/pass_packing.py
+++ b/ethosu/vela/pass_packing.py
@@ -61,10 +61,9 @@ mac_main_ops = set(
Op.AvgPool,
Op.MaxPool,
Op.ReduceSum,
- # deconvolution
- Op.ResizeBilinear,
)
-)
+ # resize ops use pooling operations unless explicitly converted to other operations prior to pass packing
+) | Op.op_set(Op.is_resize_op)
binary_elem_wise_main_ops = Op.op_set(Op.is_binary_elementwise_op)