aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite_mapping.py
diff options
context:
space:
mode:
authorJames Ward <james.ward@arm.com>2021-09-08 11:14:20 +0100
committerpatrik.gustavsson <patrik.gustavsson@arm.com>2021-10-14 05:30:58 +0000
commit6bf1613c5894d81849dd12b5be6145c1f24caca2 (patch)
tree5c46ae4c43b71403898eb5fa5f2ecab2fd16a90f /ethosu/vela/tflite_mapping.py
parent7c0607e142456ebd3577c756b419a3b551cdeafb (diff)
downloadethos-u-vela-6bf1613c5894d81849dd12b5be6145c1f24caca2.tar.gz
MLBEDSW-5162 MLCE: Vela [3.1.0] falling to run with yolov4_int8.tflite
* fix indices for tflite mapping of EXP operator * fix indices for tflite mapping of Transpose operator * ensure read offset after slice is aligned to 16 bytes for NHCWB16 or force linear format * add unit test to ensure mapping of indices is consistent across TFLite, TOSA and NNG Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I17b6e44bc06853325d5eea62a558418ee1ebefe8
Diffstat (limited to 'ethosu/vela/tflite_mapping.py')
-rw-r--r--ethosu/vela/tflite_mapping.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py
index d52e074a..396ed5ec 100644
--- a/ethosu/vela/tflite_mapping.py
+++ b/ethosu/vela/tflite_mapping.py
@@ -650,7 +650,7 @@ builtin_operator_map = {
OptionsSerializer("SpaceToBatchNDOptions"),
TFLITE_NO_INDICES,
),
- BuiltinOperator.TRANSPOSE: (Op.Transpose, OptionsSerializer("TransposeOptions"), TFLITE_NO_INDICES),
+ BuiltinOperator.TRANSPOSE: (Op.Transpose, OptionsSerializer("TransposeOptions"), TFLITE_IFM_IFM2_INDICES),
BuiltinOperator.MEAN: (Op.Mean, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_IFM_INDICES),
BuiltinOperator.SUB: (
Op.Sub,
@@ -685,7 +685,7 @@ builtin_operator_map = {
),
TFLITE_IFM_WEIGHTS_INDICES,
),
- BuiltinOperator.EXP: (Op.Exp, OptionsSerializer("ExpOptions"), TFLITE_IFM_INDICES),
+ BuiltinOperator.EXP: (Op.Exp, OptionsSerializer("ExpOptions"), TFLITE_NO_INDICES),
BuiltinOperator.TOPK_V2: (Op.TopKV2, OptionsSerializer("TopKV2Options"), TFLITE_NO_INDICES),
BuiltinOperator.SPLIT: (Op.Split, OptionsSerializer("SplitOptions", ("num_splits",)), TFLITE_SPLIT_IFM_INDICES),
BuiltinOperator.LOG_SOFTMAX: (Op.LogSoftmax, OptionsSerializer("LogSoftmaxOptions"), TFLITE_NO_INDICES),