diff options
author | Rickard Bolin <rickard.bolin@arm.com> | 2022-07-04 16:19:16 +0000 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2022-09-23 09:13:20 +0000 |
commit | fea1516f94cfcbd801124e3fdc4b5f5c4526e15b (patch) | |
tree | 92b991244ef535d652d0bb6e875e9e3a289257f5 /ethosu/vela/graph_optimiser_util.py | |
parent | cc219be4ec175645e8457da80d5effbf4324943b (diff) | |
download | ethos-u-vela-fea1516f94cfcbd801124e3fdc4b5f5c4526e15b.tar.gz |
MLBEDSW-6686: Resize bilinear HPC with tile padding
- Added support for Resize Bilinear with half pixel centers for int8 and
uint8.
- Utilizes the new "TILE" padding mode.
- Utilizes ofm stride multipliers and modified tile base offsets to
write OFMs interleaved.
Signed-off-by: Rickard Bolin <rickard.bolin@arm.com>
Change-Id: I37fa77c022a368f05fda0ead75d8696c9205f833
Diffstat (limited to 'ethosu/vela/graph_optimiser_util.py')
-rw-r--r-- | ethosu/vela/graph_optimiser_util.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ethosu/vela/graph_optimiser_util.py b/ethosu/vela/graph_optimiser_util.py index 5e7e1127..b33851a8 100644 --- a/ethosu/vela/graph_optimiser_util.py +++ b/ethosu/vela/graph_optimiser_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2021 Arm Limited or its affiliates. All rights reserved. +# Copyright (C) 2021-2022 Arm Limited or its affiliates. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 # @@ -111,6 +111,12 @@ def check_format_restrictions(tens, arch): if _avoid_nhcwb16_for_shapes(tens): return + # Resize bilinear half pixel center implementation requires OFM with linear format to + # allow stride modification in H/W dimensions. + for op in tens.ops: + if op.original_type == Op.ResizeBilinear and op.type == Op.DepthwiseConv2DBias: + return + for op in tens.consumer_list: if op.type == Op.ReduceSum and ( tens.dtype == DataType.int32 or arch.accelerator_config == Accelerator.Ethos_U65_512 |