From bdc6dc3d204dbed7c798c2be3f1357bdbf0107ee Mon Sep 17 00:00:00 2001 From: Philip Hall Date: Mon, 12 May 2025 10:48:59 +0100 Subject: [PATCH] MLBEDSW-10781: Fix transpose with LUT assert Ethos-U55 transpose with LUT generates an assert as a result of default-initialised values in the block config. This commit moves the LUT insertion until after a suitable block config is available. Signed-off-by: Philip Hall Change-Id: If2137253696d26f996605ec9bf2fab1a1c69c229 --- .../ethosu55/ethos_u55_register_cs_generator.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ethosu/regor/architecture/ethosu55/ethos_u55_register_cs_generator.cpp b/ethosu/regor/architecture/ethosu55/ethos_u55_register_cs_generator.cpp index d94caa89..2a802a49 100644 --- a/ethosu/regor/architecture/ethosu55/ethos_u55_register_cs_generator.cpp +++ b/ethosu/regor/architecture/ethosu55/ethos_u55_register_cs_generator.cpp @@ -1488,11 +1488,6 @@ void EthosU55RCSGenerator::InsertTransposeCommand(const HLCStripe *stripe, Tempo // Create new stripe operations auto cmd = std::make_unique(*stripe); cmd->operation = std::make_shared(); - if ( allowSubOps ) - { - cmd->operation->subOps = op->subOps; - if ( subOpsRequireLUT ) InsertLUTDMACommand(cmd.get(), temps, emitted); - } cmd->operation->kernel = Kernel::UnitKernel(); cmd->operation->type = OpType::AvgPool; cmd->opGroup = stripe->opGroup; @@ -1515,6 +1510,11 @@ void EthosU55RCSGenerator::InsertTransposeCommand(const HLCStripe *stripe, Tempo temps.configs.push_back(_arch->GetOpConfig(cmd->operation->type, query)); } cmd->operation->config = temps.configs.back().get(); + if ( allowSubOps ) + { + cmd->operation->subOps = op->subOps; + if ( subOpsRequireLUT ) InsertLUTDMACommand(cmd.get(), temps, emitted); + } // Add to CMD list emitted.push_back(cmd.get()); temps.cmds.push_back(std::move(cmd)); -- GitLab