From 0cf389b543aca20c42f1cb3f6519928bbbf90d59 Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Wed, 13 Dec 2023 15:34:18 +0000
Subject: [PATCH] Change a small assertion

---
 src/recipies/FuseMulAdd.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/recipies/FuseMulAdd.cpp b/src/recipies/FuseMulAdd.cpp
index d37f47496..322b1d9a0 100644
--- a/src/recipies/FuseMulAdd.cpp
+++ b/src/recipies/FuseMulAdd.cpp
@@ -38,9 +38,8 @@ void Aidge::fuseMulAdd(std::shared_ptr<Aidge::Node> matmulNode, std::shared_ptr<
     // Fetch the output dimension throught the bias size
     std::shared_ptr<Node> bias = (addNode->getParent(1)) ? addNode->getParent(1)->cloneSharedOperators() : nullptr;
 
-    if (!(matmulNode->getParent(1))) {
-        AIDGE_INTERNAL_ASSERT("No weight detected to produce the fuseMulAdd recipe.");
-    }
+    AIDGE_ASSERT(matmulNode->getParent(1), "No weight detected to produce the fuseMulAdd recipe.");
+
     std::shared_ptr<Node> weight = matmulNode->getParent(1)->cloneSharedOperators();
     const DimSize_t outSize = std::dynamic_pointer_cast<MatMul_Op>(matmulNode->getOperator()) -> getAttr<DimSize_t>("OutChannels");
 
-- 
GitLab