diff options
author | Johan Alfven <johan.alfven@arm.com> | 2023-05-11 09:38:43 +0200 |
---|---|---|
committer | Johan Alfven <johan.alfven@arm.com> | 2023-05-31 10:21:07 +0200 |
commit | 6c339854e3cb63c99f650633376cbe400dd9b23d (patch) | |
tree | e4d919aa4f90423af01eac193e2eda5df36842e3 /ethosu/vela | |
parent | 5200bd8ced01dc0b98603c250978d3b0df06db33 (diff) | |
download | ethos-u-vela-6c339854e3cb63c99f650633376cbe400dd9b23d.tar.gz |
MLBEDSW-7600: MLCE: Enable cascading for resize ops
- Added fix when building the minimum schedule forcing the stripe
to be even for is_nearest ops. This is required in order to be
able to allow cascading for resize ops.
- Remove limitation in cascade builder that prevents resize ops
to be cascaded.
Change-Id: I05150102b91531ecba786936494f1817a4472f42
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/cascade_builder.py | 1 | ||||
-rw-r--r-- | ethosu/vela/scheduler.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/ethosu/vela/cascade_builder.py b/ethosu/vela/cascade_builder.py index 95872cfe..01bbf3bf 100644 --- a/ethosu/vela/cascade_builder.py +++ b/ethosu/vela/cascade_builder.py @@ -101,7 +101,6 @@ class CascadeBuilder: and sched_op.parent_op.read_offsets[0] is None and sched_op.parent_op.read_offsets[1] is None and self.elementwise_cascadable(sched_op) - and not sched_op.parent_op.type.is_resize_op() and not sched_op.parent_op.type == Op.Conv2DBackpropInputSwitchedBias and sched_op.parent_op.attrs.get("padding", None) != Padding.TILE ) diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py index 6e2cd4a6..2174a6e3 100644 --- a/ethosu/vela/scheduler.py +++ b/ethosu/vela/scheduler.py @@ -880,6 +880,9 @@ class Scheduler: for index, sched_op in enumerate(reversed(self.sched_ops)): progress_print(verbose_progress, "Processing SchedulerOp", index, self.sched_ops) min_stripe_height = prev_op.kernel.stride.y if prev_op else 1 + if is_nearest(sched_op.resampling_mode): + # is nearest requires even stripes + min_stripe_height += min_stripe_height % 2 min_stripe = sched_op.ofm.shape.with_height(min_stripe_height) cost = sched_op.create_scheduler_info(self.nng, min_stripe) |