diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-02-04 08:22:18 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2021-02-04 13:45:48 +0000 |
commit | d1836c7a3293a1da8e34662fa1b52d08bd48c578 (patch) | |
tree | 24f9f61626f1dbfa437213ad8b40df276a6f63df | |
parent | 3d22f3c4cdff3ed1e392048265f84d07c01080d5 (diff) | |
download | ethos-u-vela-d1836c7a3293a1da8e34662fa1b52d08bd48c578.tar.gz |
MLBEDSW-3937 Fix moving FM to fast storage
Featuremaps were never moved to fast storage when tensor
is set to not use NHCWB16.
This patch enables the evaluation of feature maps to
be moved fast storage, also when tensor use NHWC.
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: I6367c975e7af8739c774cb7c34b43fb9a6776c8c
-rw-r--r-- | ethosu/vela/scheduler.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ethosu/vela/scheduler.py b/ethosu/vela/scheduler.py index 6cbff50..90b8942 100644 --- a/ethosu/vela/scheduler.py +++ b/ethosu/vela/scheduler.py @@ -964,10 +964,10 @@ class DynamicProgrammingScheduler: if ps.placement != PassPlacement.Npu: continue for output in ps.outputs: - if output.purpose != TensorPurpose.FeatureMap or output.avoid_NHCWB16: + if output.purpose != TensorPurpose.FeatureMap: continue - use_NHCWB16 = True + use_NHCWB16 = not output.avoid_NHCWB16 use_fast_storage = True rewrites = [] for op in output.consumer_list: @@ -1001,7 +1001,7 @@ class DynamicProgrammingScheduler: # Detect no-op reshapes by comparing their full input and output tensor shapes. inshape = op.ifm_shapes[0] compatible_shape = [(inshape == oper.ofm_shapes[0]) for oper in get_rewrites(op)] - use_NHCWB16 = compatible_shape and all(compatible_shape) + use_NHCWB16 &= compatible_shape and all(compatible_shape) else: use_NHCWB16 = False use_fast_storage = False |