aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite_graph_optimiser.py
diff options
context:
space:
mode:
authorRickard Bolin <rickard.bolin@arm.com>2022-09-23 10:16:48 +0000
committerRickard Bolin <rickard.bolin@arm.com>2022-09-23 11:45:33 +0000
commit017b4ccf9575a0f8ce604e2478fb09febbaa2875 (patch)
tree18931eca2e78a9a34af6d76eba59cc7c090f8edb /ethosu/vela/tflite_graph_optimiser.py
parentfea1516f94cfcbd801124e3fdc4b5f5c4526e15b (diff)
downloadethos-u-vela-017b4ccf9575a0f8ce604e2478fb09febbaa2875.tar.gz
MLBEDSW-6928: Add int16 support for Resize Bilinear HPC
Setting bias tensor dtype to DataType.int32 solves rounding issues for RB HPC int16. Removing the input data type check also solves the issue of resize nearest neighbor int16 ops incorrectly getting placed on the CPU. Signed-off-by: Rickard Bolin <rickard.bolin@arm.com> Change-Id: Iee352bcb78e581c0cde3c203dfbe866f1f6fae18
Diffstat (limited to 'ethosu/vela/tflite_graph_optimiser.py')
-rw-r--r--ethosu/vela/tflite_graph_optimiser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py
index 27513d3d..1310ee63 100644
--- a/ethosu/vela/tflite_graph_optimiser.py
+++ b/ethosu/vela/tflite_graph_optimiser.py
@@ -586,7 +586,7 @@ def convert_resizebilinear_to_depthwise_convolutions(op, half_pixel_centers=True
# need to append the bias tensor as resize ops only have 2 inputs
assert len(dw_conv.inputs) == 2
dw_conv.inputs.append(None)
- fixup_bias_tensors(dw_conv, None, None)
+ fixup_bias_tensors(dw_conv, None, None, dtype=DataType.int32)
dw_conv.set_ifm_ofm_shapes()
dw_conv = dw_conv.clone(f"_{index}")