diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2020-08-18 15:03:04 +0200 |
---|---|---|
committer | tim.hall <tim.hall@arm.com> | 2020-08-19 11:26:21 +0000 |
commit | eebb1c2190aa48dfbfbbabd3992cbad197f33c34 (patch) | |
tree | 3b9b92df0e5a37882e2214b2dd0966ad1d210eed /ethosu | |
parent | 597fd3f88397501d61855a327c9632fc1dab3f57 (diff) | |
download | ethos-u-vela-eebb1c2190aa48dfbfbbabd3992cbad197f33c34.tar.gz |
MLBEDSW-2779 Avoid NHCWB16 in some SplitSliceRead cases
NHCWB16 is avoided for the input tensor for SplitSliceRead,
when any of the consumers has an start offset in C-dimension
that is not a multiple of 16.
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: I333e2acfbeb02b9c34ee5ea28074baff12ea7b24
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/graph_optimiser.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py index daae915d..26ee73c2 100644 --- a/ethosu/vela/graph_optimiser.py +++ b/ethosu/vela/graph_optimiser.py @@ -108,6 +108,10 @@ def rewrite_split(tens, arch): break offset_start[axis] += out.shape[axis] + # If start offset is not a multiple of 16 in the C-dimension, NHCWB16 need to be avoided in the input + if (offset_start[-1] % 16) != 0: + inp.avoid_NHCWB16 = True + offset_end[axis] = offset_start[axis] + tens.shape[axis] new_op.attrs["split_start"] = offset_start |