diff options
author | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-02-04 16:28:29 +0100 |
---|---|---|
committer | Patrik Gustavsson <patrik.gustavsson@arm.com> | 2021-02-08 14:24:41 +0100 |
commit | da2b0030220e87788573a724979626aa92afd13e (patch) | |
tree | 66b0400f90e6854129005e08232f7db94c64fd14 /ethosu/vela/graph_optimiser.py | |
parent | 455e20e5ed0d5ce141a921e67f0219e55044e6e1 (diff) | |
download | ethos-u-vela-da2b0030220e87788573a724979626aa92afd13e.tar.gz |
MLBEDSW-3937 Fix check for NHCWB16 for FC
Fix check for NHCWB16 for modifying FC input.
Signed-off-by: Patrik Gustavsson <patrik.gustavsson@arm.com>
Change-Id: Ie50c32ca079afadd0af9b7b909820794ceee373c
Diffstat (limited to 'ethosu/vela/graph_optimiser.py')
-rw-r--r-- | ethosu/vela/graph_optimiser.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py index 1e3b1314..5c1b90bd 100644 --- a/ethosu/vela/graph_optimiser.py +++ b/ethosu/vela/graph_optimiser.py @@ -251,7 +251,6 @@ def fixup_conv2d_backprop(op, arch, nng): if op.type == Op.Conv2DBackpropInput: # flip the inputs op.inputs[0], op.inputs[2] = op.inputs[2], op.inputs[0] - op.set_ifm_ofm_shapes() op.type = Op.Conv2DBackpropInputSwitchedBias op.ifm.resampling_mode = resampling_mode.TRANSPOSE @@ -370,10 +369,9 @@ def rewrite_fully_connected_input(op, arch, nng): batch_size = elms // n_in_elems assert batch_size * n_in_elems == elms - if op.ifm.shape != [batch_size, n_in_elems]: - op.ifm.avoid_NHCWB16 = True - op.ifm_shapes[0] = Shape4D([batch_size, 1, 1, n_in_elems]) + if Shape4D(op.ifm.shape) != op.ifm_shapes[0]: + op.ifm.avoid_NHCWB16 = True return op |