From a1a83f252ccaf1572d458b766b1da7c7c2b3d92c Mon Sep 17 00:00:00 2001
From: NAUD Maxence <maxence.naud@cea.fr>
Date: Fri, 29 Mar 2024 16:09:33 +0000
Subject: [PATCH] Fix test_scheduler test and put back warning in Node

---
 src/graph/Node.cpp                      | 7 ++++---
 unit_tests/scheduler/Test_Scheduler.cpp | 3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/graph/Node.cpp b/src/graph/Node.cpp
index f81b2b88f..a0e828cbc 100644
--- a/src/graph/Node.cpp
+++ b/src/graph/Node.cpp
@@ -173,6 +173,7 @@ void Aidge::Node::setInputId(const IOIndex_t inId, const IOIndex_t newNodeoutId)
         "Input index ({}) is out of bound ({}) for node {} (of type {})",
         inId, nbInputs(), name(), type());
     if (mIdOutParents[inId] != gk_IODefaultIndex) {
+        Log::warn("Warning: filling a Tensor already attributed\n");
         auto originalParent = input(inId);
         // remove original parent reference to child
         // find the output ID for original Parent
@@ -393,17 +394,17 @@ std::set<Aidge::NodePtr> Aidge::Node::getNodeDelta(int delta, std::set<Aidge::No
 // namespace Aidge {
 // std::ostream& operator << (std::ostream& os, Aidge::Node& n) {
 //     using namespace std;
-//     os << "Node :\tName :\t\"" << n.name() << "\"\tType : \"" << n.getOperator()->type()<< "\"\tIN/OUTputs : "<< n.nbInputs() <<"/"<< n.nbOutputs() <<endl; 
+//     os << "Node :\tName :\t\"" << n.name() << "\"\tType : \"" << n.getOperator()->type()<< "\"\tIN/OUTputs : "<< n.nbInputs() <<"/"<< n.nbOutputs() <<endl;
 //     os << "\tParents :\t" ;
 //     for (const auto & p : n.getParents())
 //     {
-//         os << "\"" <<p->name() << "\"\t"; 
+//         os << "\"" <<p->name() << "\"\t";
 //     }
 //     os << endl;
 //     os << "\tChildren :\t" ;
 //     for (const auto & c : n.getChildren())
 //     {
-//         os << "\"" << c->name() << "\"\t"; 
+//         os << "\"" << c->name() << "\"\t";
 //     }
 //     os << endl;
 //     return os;
diff --git a/unit_tests/scheduler/Test_Scheduler.cpp b/unit_tests/scheduler/Test_Scheduler.cpp
index b928f408e..514fb3b49 100644
--- a/unit_tests/scheduler/Test_Scheduler.cpp
+++ b/unit_tests/scheduler/Test_Scheduler.cpp
@@ -44,6 +44,7 @@ TEST_CASE("randomScheduling", "[Scheduler][randomGen]") {
     const size_t nb_nodes = nb_nodes_dist(gen);
 
     SECTION("Acyclic Graph") {
+        Aidge::Log::setConsoleLevel(Aidge::Log::Warn);
       fmt::print("gen acyclic graph of {} nodes...\n", nb_nodes);
       randGraph.acyclic = true;
 
@@ -65,7 +66,7 @@ TEST_CASE("randomScheduling", "[Scheduler][randomGen]") {
         }
 
         g1->save("schedule");
-        g1->forwardDims();
+        g1->compile();
 
         fmt::print("gen scheduling...\n");
         auto scheduler = SequentialScheduler(g1);
-- 
GitLab