From 6c97e9a689736febf76c739c6b677d1b253048e5 Mon Sep 17 00:00:00 2001 From: Patrik Gustavsson Date: Wed, 23 Sep 2020 11:02:18 +0200 Subject: MLBEDSW-3018 Change to check for avoiding NHCWB16 Fixed issue with checking if axis corresponds to C-dim Signed-off-by: Patrik Gustavsson Change-Id: I72d9fd2c9fca642b5ab326324a63111b01c5de98 --- ethosu/vela/graph_optimiser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py index f6b03f67..e5fbc25f 100644 --- a/ethosu/vela/graph_optimiser.py +++ b/ethosu/vela/graph_optimiser.py @@ -103,7 +103,7 @@ def rewrite_concat(tens, arch): # multiple of 16. This as, it is only then the address offset for the ofm, for all operations, will be 16 byte # aligned. For other values of axis the address offsets will be 16 byte aligned, as they are all based on c = 0 # and those addresses are always 16 byte aligned due to the NHCWB16 format. - if axis == (len(tens.shape) - 1): + if axis == -1 or axis == (len(tens.shape) - 1): for op in tens.ops: if op.attrs["concat_start"] % 16 != 0: tens.avoid_NHCWB16 = True -- cgit v1.2.1