From 00a05c0a4d5c2893410fe7aca0af452236756891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Alfv=C3=A9n?= Date: Mon, 2 Jun 2025 10:25:10 +0200 Subject: [PATCH] MLBEDSW-10865: MLCE: Fix output diff on Split MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed an issue where multiple Split operators followed by another Split could lead to an output diff. - The fix prevents a SplitSliceRead from being moved to a consumer if the consumer is also a SplitSliceRead. Change-Id: I7d7d66b938a7153c81adb0a085938e6747211c58 Signed-off-by: Johan Alfvén --- ethosu/vela/tflite_graph_optimiser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ethosu/vela/tflite_graph_optimiser.py b/ethosu/vela/tflite_graph_optimiser.py index 1834638d..10f374b2 100644 --- a/ethosu/vela/tflite_graph_optimiser.py +++ b/ethosu/vela/tflite_graph_optimiser.py @@ -204,6 +204,7 @@ def remove_SplitSliceRead(op, arch): # - if ifm stride multiplier is larger than one in any dimension # - if consumer is a Transpose op since ifm shape has been reshaped and can not be changed # - if consumer is elementwise and ifm needs to be broadcasted + # - if consumer is a SplitSliceRead, do not support multiple Splits if ( op.ofm_shapes[0] == Shape4D.from_list(op.ofm.shape) and all(s_mul == 1 for s_mul in op.ifm_stride_multiplier[0]) @@ -212,6 +213,7 @@ def remove_SplitSliceRead(op, arch): and consumer.run_on_npu and consumer.type not in memory_only_ops and consumer.original_type != Op.Transpose + and consumer.original_type != Op.SplitSliceRead and check_splitsliceread_to_consumer_shape(op, consumer) and not ( consumer.type.is_binary_elementwise_op() -- GitLab