From ff1e807f69c0f4f7f90894a1085e934299b161d8 Mon Sep 17 00:00:00 2001 From: Johan Gunnarsson Date: Fri, 16 May 2025 17:30:29 +0200 Subject: [PATCH] MLBEDSW-10835: Ops with OFM slice ends fuse/chain Only the last op in a chain is allowed to have OFM slice. Signed-off-by: Johan Gunnarsson Change-Id: I1d4329058bd4ae0761db630889af1647ba2e462b --- ethosu/regor/compiler/scheduler_packing.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ethosu/regor/compiler/scheduler_packing.cpp b/ethosu/regor/compiler/scheduler_packing.cpp index bc89441d..eb2251c1 100644 --- a/ethosu/regor/compiler/scheduler_packing.cpp +++ b/ethosu/regor/compiler/scheduler_packing.cpp @@ -508,6 +508,12 @@ int SchedulerPacking::CanPack(const SchedulerOperation *schedOp, const Scheduler return 0; } + // Previous op has OFM slice + if ( !Shape::IsReducedEqual(prevConnOfm->shape, prevConnOfm->SliceShape()) ) + { + return 0; + } + if ( schedOp->OFM()->tensor->isGraphOutput || prevOp->OFM()->tensor->isGraphOutput ) { return 0; -- GitLab