aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Bohlin <jacob.bohlin@arm.com>2021-02-11 16:04:53 +0100
committerJacob Bohlin <jacob.bohlin@arm.com>2021-02-12 08:46:12 +0100
commit2a58530de2686a3dc1cbe791f1f951b9ea7c39aa (patch)
tree53d980b6b4e1e62152736b00612b57d57038b998
parent2446e59a9083f36f85beb88fdec6379d90b85cad (diff)
downloadethos-u-vela-2a58530de2686a3dc1cbe791f1f951b9ea7c39aa.tar.gz
MLBEDSW-3600: Cascading support for ResizeBilinear
Signed-off-by: Jacob Bohlin <jacob.bohlin@arm.com> Change-Id: I7899263ff5bb3d0de00681ee8351a02eecff1553
-rw-r--r--ethosu/vela/scheduler.py2
-rw-r--r--ethosu/vela/shared_buffer_allocation.py9
2 files changed, 6 insertions, 5 deletions
diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py
index 9251623..6ee06e2 100644
--- a/ethosu/vela/scheduler.py
+++ b/ethosu/vela/scheduler.py
@@ -649,8 +649,6 @@ class DynamicProgrammingScheduler:
if len(op.outputs) > 1 or len(op.outputs[0].consumer_list) > 1:
# The op has consumers in other subgraphs
return True
- if op.type == Op.ResizeBilinear:
- return True
return False
def search_ifm_streaming_partial(self, ps, block_config):
diff --git a/ethosu/vela/shared_buffer_allocation.py b/ethosu/vela/shared_buffer_allocation.py
index 2043864..ea4aaf0 100644
--- a/ethosu/vela/shared_buffer_allocation.py
+++ b/ethosu/vela/shared_buffer_allocation.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2020 Arm Limited or its affiliates. All rights reserved.
+# Copyright (C) 2020-2021 Arm Limited or its affiliates. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -279,10 +279,13 @@ def find_suitable_block_configs(arch, alloc: SharedBufferAllocation) -> List[Tup
max_block_height = min(arch.ofm_block_max.height, max_block_height)
max_block_depth = min(arch.ofm_block_max.depth, max_block_depth)
+ min_block_height = max(arch.ofm_ublock.height, 2 if alloc.ifm_resampling_mode != resampling_mode.NONE else 1)
+ min_block_width = max(arch.ofm_ublock.width, 2 if alloc.ifm_resampling_mode != resampling_mode.NONE else 1)
+
valid_block_configs = []
# Try a range of block shapes against this pass
- for w in range(arch.ofm_ublock.width, max_block_width + arch.ofm_ublock.width, arch.ofm_ublock.width):
- for h in range(arch.ofm_ublock.height, max_block_height + arch.ofm_ublock.height, arch.ofm_ublock.height):
+ for w in range(min_block_width, max_block_width + min_block_width, min_block_width):
+ for h in range(min_block_height, max_block_height + min_block_height, min_block_height):
# Try valid OFM block depths
for c in range(arch.ofm_ublock.depth, max_block_depth + arch.ofm_ublock.depth, arch.ofm_ublock.depth):
# OFM block depth has the constraint that if it causes the OFM to be