From 0b86ce6602fa2b8b3c3a360f0f6e21b20f999667 Mon Sep 17 00:00:00 2001 From: Olivier BICHLER <olivier.bichler@cea.fr> Date: Thu, 11 Jul 2024 23:07:17 +0200 Subject: [PATCH] Fixed issue --- src/recipes/MatMulToFC.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/recipes/MatMulToFC.cpp b/src/recipes/MatMulToFC.cpp index af775ced7..87cb48682 100644 --- a/src/recipes/MatMulToFC.cpp +++ b/src/recipes/MatMulToFC.cpp @@ -28,7 +28,9 @@ void Aidge::matMulToFC(std::shared_ptr<Aidge::Node> matmulNode, std::shared_ptr<Aidge::Node> addNode) { // Fuse Mulmat & Add into FC // Inputs : old nodes (pointers on mul & add) - AIDGE_ASSERT((matmulNode->type() == "MatMul" && (addNode == nullptr || addNode->type() == "Add")), "Wrong type for the nodes to replace"); + AIDGE_ASSERT((matmulNode->type() == "MatMul" && (addNode == nullptr || addNode->type() == "Add")), + "Wrong type for the nodes to replace: {} and {}", + matmulNode->type(), (addNode) ? addNode->type() : "nullptr"); // Step 1 : Create FC @@ -103,6 +105,6 @@ void Aidge::matMulToFC(std::shared_ptr<Aidge::GraphView> graphView){ for (const auto& match : matches) { const auto it = match.anchors.find("Add"); - matMulToFC(match.startNode, (it != match.anchors.end()) ? it->second.at("#") : nullptr); + matMulToFC(match.graph->rootNode(), (it != match.anchors.end()) ? it->second.at("#") : nullptr); } } -- GitLab