From a00f3ced2287d948e0898ce91869d45da14bedb2 Mon Sep 17 00:00:00 2001 From: Philip Hall Date: Tue, 11 Feb 2025 11:09:42 +0000 Subject: [PATCH] MLBEDSW-10421: Fix CAST input order Recent ordered map traversal checks showed CAST operator inserts its IFMs in permuted order. This rearranges the IFMs to match traversal order. Signed-off-by: Philip Hall Change-Id: Id3c9b4b43a2afb7f9cfc757d99e26d224d3960e3 --- ethosu/regor/compiler/graphir_optimiser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethosu/regor/compiler/graphir_optimiser.cpp b/ethosu/regor/compiler/graphir_optimiser.cpp index 565535ee..0f00be0b 100644 --- a/ethosu/regor/compiler/graphir_optimiser.cpp +++ b/ethosu/regor/compiler/graphir_optimiser.cpp @@ -1123,8 +1123,8 @@ Operation *GraphIrOptimiser::RewriteCast(Graph *const, Operation *const operatio { // Replace CAST with ADD auto copyOp = std::make_shared(OpType::Add); - copyOp->ConnectInput(TensorUsage::IFM1, CreateConstTensor("const_zero", ifmConn->tensor->Type(), 0)); ReplaceOperation(operation, copyOp.get()); + copyOp->ConnectInput(TensorUsage::IFM1, CreateConstTensor("const_zero", ifmConn->tensor->Type(), 0)); RecordOptimisation(operation, copyOp.get()); returnOp = copyOp.get(); -- GitLab