diff options
author | Tim Hall <tim.hall@arm.com> | 2020-11-10 19:58:59 +0000 |
---|---|---|
committer | Tim Hall <tim.hall@arm.com> | 2020-11-20 12:55:48 +0000 |
commit | 907cb03bb73ce590b044947b0981ceb25e8c3430 (patch) | |
tree | eb2815d48b47a3e9b73acf1e6a025d16ddefeb77 /ethosu/vela | |
parent | b9b515ca996e1ec5835a2c35033cc6f818f71f12 (diff) | |
download | ethos-u-vela-907cb03bb73ce590b044947b0981ceb25e8c3430.tar.gz |
vela: Tanh and Sigmoid broken in fixup_act_reorder
- Fixed bug due to typo in Op.type refactor
Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: I55916d90bf792648f496a45c358b7e897c6730ba
Diffstat (limited to 'ethosu/vela')
-rw-r--r-- | ethosu/vela/graph_optimiser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py index 4f473ddb..7401927d 100644 --- a/ethosu/vela/graph_optimiser.py +++ b/ethosu/vela/graph_optimiser.py @@ -322,7 +322,7 @@ def convert_batched_fc_shape(op, arch, nng): ifm = op.inputs[0] ofm = op.outputs[0] # Check if the FC is 2D and first dimension indicates batching - if len(ifm.shape) == len(ofm.shape) == 2 and ifm.shape[0] != 1: + if len(ifm.shape) == len(ofm.shape) == 2 and ifm.shape[0] > 1: n = ifm.shape[0] batching_split = {4: (2, 2), 8: (2, 4), 16: (4, 4)} h, w = batching_split.get(n, (1, n)) @@ -649,7 +649,7 @@ def fixup_relus_with_differing_ifm_ofm_scaling(op, arch, nng): # Reorder activation op if it's after the memory only operations def fixup_act_reorder(op, arch, nng): - if op.type.is_relu_op() or op in set((Op.Sigmoid, Op.Tanh)): + if op.type.is_relu_op() or op.type in set((Op.Sigmoid, Op.Tanh)): prep_op = get_prepend_op(op) if prep_op is not None: act_op = op.clone("_reordered") |