From ed10a0f25b7500ef2f719311a20052e7712025d8 Mon Sep 17 00:00:00 2001 From: NAUD Maxence <maxence.naud@cea.fr> Date: Tue, 14 Nov 2023 00:42:24 +0000 Subject: [PATCH] [Rmv] Comment HorizontalTiling recipie and its test --- include/aidge/recipies/Recipies.hpp | 8 +- unit_tests/recipies/Test_HorizontalTiling.cpp | 107 ++++++++++-------- 2 files changed, 61 insertions(+), 54 deletions(-) diff --git a/include/aidge/recipies/Recipies.hpp b/include/aidge/recipies/Recipies.hpp index 38b190e68..d03dcc3dc 100644 --- a/include/aidge/recipies/Recipies.hpp +++ b/include/aidge/recipies/Recipies.hpp @@ -68,10 +68,10 @@ void fuseBatchNorm(std::set<std::shared_ptr<Node>> nodes); */ void fuseBatchNorm(std::shared_ptr<GraphView> graphView); -std::set<std::shared_ptr<Node>> getHorizontalTiling(const std::shared_ptr<Node>& node, const DimIdx_t axis, const std::size_t nbSlices); -void horizontalTiling(std::shared_ptr<Node> node, DimIdx_t dim, std::size_t nbSlices); -std::set<std::shared_ptr<Node>> getHorizontalTiling(std::set<std::shared_ptr<Node>> setOfNodes, DimIdx_t dim, std::size_t nbSlices); -void horizontalTiling(std::set<std::shared_ptr<Node>> setOfNodes, DimIdx_t dim, std::size_t nbSlices); +// std::set<std::shared_ptr<Node>> getHorizontalTiling(const std::shared_ptr<Node>& node, const DimIdx_t axis, const std::size_t nbSlices); +// void horizontalTiling(std::shared_ptr<Node> node, DimIdx_t dim, std::size_t nbSlices); +// std::set<std::shared_ptr<Node>> getHorizontalTiling(std::set<std::shared_ptr<Node>> setOfNodes, DimIdx_t dim, std::size_t nbSlices); +// void horizontalTiling(std::set<std::shared_ptr<Node>> setOfNodes, DimIdx_t dim, std::size_t nbSlices); } diff --git a/unit_tests/recipies/Test_HorizontalTiling.cpp b/unit_tests/recipies/Test_HorizontalTiling.cpp index a1a54b4eb..c9fb5ed6d 100644 --- a/unit_tests/recipies/Test_HorizontalTiling.cpp +++ b/unit_tests/recipies/Test_HorizontalTiling.cpp @@ -1,13 +1,13 @@ -/******************************************************************************** - * Copyright (c) 2023 CEA-List - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License 2.0 which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * SPDX-License-Identifier: EPL-2.0 - * - ********************************************************************************/ +// /******************************************************************************** +// * Copyright (c) 2023 CEA-List +// * +// * This program and the accompanying materials are made available under the +// * terms of the Eclipse Public License 2.0 which is available at +// * http://www.eclipse.org/legal/epl-2.0. +// * +// * SPDX-License-Identifier: EPL-2.0 +// * +// ********************************************************************************/ // #include <catch2/catch_test_macros.hpp> // #include <set> @@ -124,31 +124,37 @@ // { // { // {{ 15226, 15577, 15928}, -// { 16981, 17332, 17683}, -// { 18736, 19087, 19438}}, +// { 16981, 17332, 17683}, +// { 18736, 19087, 19438}}, + // {{ 37818, 38898, 39978}, -// { 43218, 44298, 45378}, -// { 48618, 49698, 50778}}, +// { 43218, 44298, 45378}, +// { 48618, 49698, 50778}}, + // {{ 60426, 62235, 64044}, -// { 69471, 71280, 73089}, -// { 78516, 80325, 82134}}, +// { 69471, 71280, 73089}, +// { 78516, 80325, 82134}}, + // {{ 83016, 85554, 88092}, -// { 95706, 98244, 100782}, -// {108396, 110934, 113472}} +// { 95706, 98244, 100782}, +// {108396, 110934, 113472}} // }, // { // {{ 41551, 41902, 42253}, -// { 43306, 43657, 44008}, -// { 45061, 45412, 45763}}, +// { 43306, 43657, 44008}, +// { 45061, 45412, 45763}}, + // {{118818, 119898, 120978}, -// {124218, 125298, 126378}, -// {129618, 130698, 131778}}, +// {124218, 125298, 126378}, +// {129618, 130698, 131778}}, + // {{196101, 197910, 199719}, -// {205146, 206955, 208764}, -// {214191, 216000, 217809}}, +// {205146, 206955, 208764}, +// {214191, 216000, 217809}}, + // {{273366, 275904, 278442}, -// {286056, 288594, 291132}, -// {298746, 301284, 303822}} +// {286056, 288594, 291132}, +// {298746, 301284, 303822}} // } // } // }); @@ -159,9 +165,7 @@ // std::shared_ptr<GraphView> g; // g->add(myConv); -// auto tiledConv = horizontalTile({myConv}, 3); -// g->replace({myConv}, {tiledConv}); - +// horizontalTiling({myConv}, 3); // SequentialScheduler s(g); // s->forward(); @@ -169,25 +173,28 @@ // // myConv->getOperator()->getOutput(0)->print(); // REQUIRE(*(myConv->getOperator()->getOutput(0)) == *myOutput); // } - // std::shared_ptr<GraphView> g = Sequential({ - // Conv(3, 16, {3,3}, "conv1"), - // ReLU("relu1"), - // Conv(16, 32, {1,1}, "conv2"), - // Conv(32, 16, {1,1}, "conv3"), - // Conv(16, 10, {3,3}, "conv4"), - // ReLU("relu2") - // }); - - // for (auto& individualConv : g->match("Conv")) { - // auto tiledConv = horizontalTiling(individualConv); - // g->replace(individualConv, tiledConv); - // } - // } - - // SECTION("Create the GraphView with tiled layers") { - // std::shared_ptr<GraphView> g; - // g->addChild(horizontalTiling(Conv())) - // } - +// } +// } // } -// } // namespace Aidge \ No newline at end of file +// // std::shared_ptr<GraphView> g = Sequential({ +// // Conv(3, 16, {3,3}, "conv1"), +// // ReLU("relu1"), +// // Conv(16, 32, {1,1}, "conv2"), +// // Conv(32, 16, {1,1}, "conv3"), +// // Conv(16, 10, {3,3}, "conv4"), +// // ReLU("relu2") +// // }); + +// // for (auto& individualConv : g->match("Conv")) { +// // auto tiledConv = horizontalTiling(individualConv); +// // g->replace(individualConv, tiledConv); +// // } +// // } + +// // SECTION("Create the GraphView with tiled layers") { +// // std::shared_ptr<GraphView> g; +// // g->addChild(horizontalTiling(Conv())) +// // } + +// // } +// // } // namespace Aidge \ No newline at end of file -- GitLab