From 6bf1613c5894d81849dd12b5be6145c1f24caca2 Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 8 Sep 2021 11:14:20 +0100 Subject: 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 Change-Id: I17b6e44bc06853325d5eea62a558418ee1ebefe8 --- ethosu/vela/tflite_mapping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethosu/vela/tflite_mapping.py') 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), -- cgit v1.2.1