aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tosa_graph_optimiser.py
diff options
context:
space:
mode:
authorJohan Alfven <johan.alfven@arm.com>2024-04-04 15:50:08 +0200
committerJohan Alfven <johan.alfven@arm.com>2024-04-05 09:03:24 +0200
commit31947ad1aec50b64508bf367cb3e87c93f8c4693 (patch)
tree0d2b1d91308ffb2feaeb8a82717b951bc1da4d99 /ethosu/vela/tosa_graph_optimiser.py
parentabed3c27c9e02a96017b497a17fe8641c31c0502 (diff)
downloadethos-u-vela-31947ad1aec50b64508bf367cb3e87c93f8c4693.tar.gz
Fix various pre-commit errors
Change-Id: I8e584a036036f35a8883b2a4884cb2d54e675e39 Signed-off-by: Johan Alfven <johan.alfven@arm.com>
Diffstat (limited to 'ethosu/vela/tosa_graph_optimiser.py')
-rw-r--r--ethosu/vela/tosa_graph_optimiser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ethosu/vela/tosa_graph_optimiser.py b/ethosu/vela/tosa_graph_optimiser.py
index bcb4aac8..19244c27 100644
--- a/ethosu/vela/tosa_graph_optimiser.py
+++ b/ethosu/vela/tosa_graph_optimiser.py
@@ -357,6 +357,7 @@ def rewrite_activation(op, arch, nng):
return op
+
def rewrite_rescale(op, arch, nng):
if op.type == Op.Rescale:
ifm = op.ifm
@@ -364,7 +365,6 @@ def rewrite_rescale(op, arch, nng):
# some error checking
assert len(ifm.ops) == 1
- prev_op = ifm.ops[0]
input_zp = op.attrs["input_zp"]
output_zp = op.attrs["output_zp"]
@@ -409,6 +409,7 @@ def rewrite_rescale(op, arch, nng):
return op
+
def convert_pad_in_width(op):
"""
Rewrites PAD operator to an add that copies the IFM to the OFM