diff options
author | Johan Alfven <johan.alfven@arm.com> | 2023-01-13 08:46:27 +0100 |
---|---|---|
committer | Johan Alfven <johan.alfven@arm.com> | 2023-01-16 14:40:20 +0100 |
commit | f34904717f643499f3ea6210322bbe1b635db088 (patch) | |
tree | c66fbaa4a67bf9901f2b7dbe5d184633634d3200 | |
parent | 78fc9bc5cf8150894a56a3918b6502ea2b0a0fa1 (diff) | |
download | ethos-u-vela-f34904717f643499f3ea6210322bbe1b635db088.tar.gz |
MLBEDSW-7091: MLCE: Reduce SRAM, compiling for Performance
- Previously a feature was added in order to reduce SRAM usage
when optimizing for Size. An investigation has now been done
that shows that this feature is also beneficial when optimizing for
Performance and hence this patch removes the Size only limitation.
Change-Id: I5b130db43cbda47e09d4196ab1daa5a21e35ae00
Signed-off-by: Johan Alfven <johan.alfven@arm.com>
-rw-r--r-- | ethosu/vela/scheduler.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py index 4e0599e1..eeed44fd 100644 --- a/ethosu/vela/scheduler.py +++ b/ethosu/vela/scheduler.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2020-2022 Arm Limited and/or its affiliates <open-source-office@arm.com> +# SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com> # # SPDX-License-Identifier: Apache-2.0 # @@ -409,9 +409,9 @@ class Scheduler: self.evicted_fms: List[live_range.LiveRange] = [] def avoid_nhcwb16_for_ofm(self, tens, ps, arch): - # Only run this check for opt strategy Size - if self.scheduler_options.optimization_strategy == OptimizationStrategy.Performance: - return False + """For elementwise ops when ifm is in nhwc format and not brick format aligned (16), + then if the ofm can overwrite the ifm it is better to enforce ofm format to nhwc in + order to reduce memory transactions""" op = ps.primary_op if not op.type.is_elementwise_op(): |