aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Gustavsson <patrik.gustavsson@arm.com>2020-11-25 13:41:22 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2020-11-25 16:38:10 +0000
commit34b9dc15b27219bd6485eb5104506d647e1f6d29 (patch)
tree9a2f580b58fad9c71fbbb728de30f87fbc25ffac
parent11831ce127904b7cbf9641642e5414818a2cb40d (diff)
downloadethos-u-vela-34b9dc15b27219bd6485eb5104506d647e1f6d29.tar.gz
MLBEDSW-3352 Fix ifm end_coord for upsampling
-Fix for end_coord for upsampling -Remove restriction for ifm streaming -Added restriction for cascading on ResizeBilinear Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com> Change-Id: I384abf12cfe8ac9ce7b76066b709600ea901b248
-rw-r--r--ethosu/vela/high_level_command_stream.py2
-rw-r--r--ethosu/vela/scheduler.py10
2 files changed, 4 insertions, 8 deletions
diff --git a/ethosu/vela/high_level_command_stream.py b/ethosu/vela/high_level_command_stream.py
index 8a28f9f..30e22ff 100644
--- a/ethosu/vela/high_level_command_stream.py
+++ b/ethosu/vela/high_level_command_stream.py
@@ -104,7 +104,7 @@ class Box:
# Adjust for upscaling
new_start_coord[-3] = max(new_start_coord[-3] // upscaling_factor, 0)
new_end_coord[-3] = new_end_coord[-3] * stride + skirt[2] + (skirt[2] % upscaling_factor)
- new_end_coord[-3] = min(new_end_coord[-3] // upscaling_factor, ifm_shape[-3])
+ new_end_coord[-3] = max(min(new_end_coord[-3] // upscaling_factor, ifm_shape[-3]), 1)
return Box(new_start_coord, new_end_coord), pad_top, pad_bottom
diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py
index 943c590..7347b5a 100644
--- a/ethosu/vela/scheduler.py
+++ b/ethosu/vela/scheduler.py
@@ -557,12 +557,6 @@ class DynamicProgrammingScheduler:
return strat_data
- def avoid_ifm_streaming(self, ps):
- for op in ps.ops:
- if op.type in (Op.Conv2DBackpropInputSwitchedBias, Op.ResizeBilinear):
- return True
- return False
-
@lru_cache(maxsize=None)
def search_output(self, ps):
@@ -571,7 +565,7 @@ class DynamicProgrammingScheduler:
candidate_list.extend(self.search_weight_streaming_output(ps))
- if self.options.use_ifm_streaming and not self.avoid_ifm_streaming(ps):
+ if self.options.use_ifm_streaming:
candidate_list.extend(self.search_ifm_streaming_output(ps))
best = self.filter_pareto_frontier(candidate_list, remove_equally_good_candidates=True)
@@ -657,6 +651,8 @@ 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):