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 d94caa8944317db740cd4342735b56d195b6b0f5..2a802a497a110d6c1daf50843eb4c032c072cc83 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));