From eebb1c2190aa48dfbfbbabd3992cbad197f33c34 Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Tue, 18 Aug 2020 15:03:04 +0200 Subject: 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 Change-Id: I333e2acfbeb02b9c34ee5ea28074baff12ea7b24 --- ethosu/vela/graph_optimiser.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.1