Skip the NOP resizebilinear op
Signed-off-by: Charles Xu <charles.xu@arm.com>
Change-Id: Ibd0cd152fbc46dea0c92fd1bf7da1ffc9803fdba
diff --git a/ethosu/vela/graph_optimiser.py b/ethosu/vela/graph_optimiser.py
index 9c6e1f5..a9d5cce 100644
--- a/ethosu/vela/graph_optimiser.py
+++ b/ethosu/vela/graph_optimiser.py
@@ -212,6 +212,10 @@
if op.type == "ResizeBilinear":
if op.inputs[0].shape[1] == 1 and op.inputs[0].shape[2] == 1:
convert_resizebilinear_1x1_to_add(op)
+ elif op.inputs[0].shape == op.outputs[0].shape:
+ # Bypass nop resizebilinear
+ op.inputs = op.inputs[:1]
+ op.type = "Identity"
return op