From 21b6c726b5ce5effa87a6a6d45c23a726ecd4571 Mon Sep 17 00:00:00 2001
From: Olivier BICHLER <olivier.bichler@cea.fr>
Date: Tue, 17 Oct 2023 21:00:17 +0200
Subject: [PATCH] Fixed issue with Pad template instanciation

---
 unit_tests/operator/Test_PadImpl.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/unit_tests/operator/Test_PadImpl.cpp b/unit_tests/operator/Test_PadImpl.cpp
index 0799aefa..b603e165 100644
--- a/unit_tests/operator/Test_PadImpl.cpp
+++ b/unit_tests/operator/Test_PadImpl.cpp
@@ -24,7 +24,7 @@ TEST_CASE("[cpu/operator] Pad(forward)") {
     SECTION("Symmetric Pad") {
         const int pv = 0; // pad value
 
-        std::shared_ptr<Node> myPad = Pad({1, 1, 1, 1}, "mypad", PadBorderType::Constant, static_cast<double>(pv));
+        std::shared_ptr<Node> myPad = Pad<2>({1, 1, 1, 1}, "mypad", PadBorderType::Constant, static_cast<double>(pv));
         myPad->getOperator()->setDatatype(DataType::Int32);
         myPad->getOperator()->setBackend("cpu");
         std::shared_ptr<Tensor> myInput = std::make_shared<Tensor>(Array4D<int,2,3,5,5> { //NCHW
@@ -134,7 +134,7 @@ TEST_CASE("[cpu/operator] Pad(forward)") {
     SECTION("Asymmetric Pad") {
         const int pv = 0; // pad value
 
-        std::shared_ptr<Node> myPad = Pad({1, 0, 0, 1}, "mypad", PadBorderType::Constant, static_cast<double>(pv));
+        std::shared_ptr<Node> myPad = Pad<2>({1, 0, 0, 1}, "mypad", PadBorderType::Constant, static_cast<double>(pv));
         myPad->getOperator()->setDatatype(DataType::Int32);
         myPad->getOperator()->setBackend("cpu");
         std::shared_ptr<Tensor> myInput = std::make_shared<Tensor>(Array4D<int,2,3,5,5> { //NCHW
@@ -236,7 +236,7 @@ TEST_CASE("[cpu/operator] Pad(forward)") {
     }
 
     SECTION("Pad Edge") {
-        std::shared_ptr<Node> myPad = Pad({1, 1, 1, 1}, "mypad", PadBorderType::Edge);
+        std::shared_ptr<Node> myPad = Pad<2>({1, 1, 1, 1}, "mypad", PadBorderType::Edge);
         myPad->getOperator()->setDatatype(DataType::Int32);
         myPad->getOperator()->setBackend("cpu");
         std::shared_ptr<Tensor> myInput = std::make_shared<Tensor>(Array4D<int,2,3,5,5> { //NCHW
@@ -344,7 +344,7 @@ TEST_CASE("[cpu/operator] Pad(forward)") {
     }
 
     SECTION("Pad Reflect") {
-        std::shared_ptr<Node> myPad = Pad({1, 1, 1, 1}, "mypad", PadBorderType::Reflect);
+        std::shared_ptr<Node> myPad = Pad<2>({1, 1, 1, 1}, "mypad", PadBorderType::Reflect);
         myPad->getOperator()->setDatatype(DataType::Int32);
         myPad->getOperator()->setBackend("cpu");
         std::shared_ptr<Tensor> myInput = std::make_shared<Tensor>(Array4D<int,2,3,5,5> { //NCHW
@@ -460,7 +460,7 @@ TEST_CASE("[cpu/operator] Pad(forward)") {
     }
 
     SECTION("Pad Wrap") {
-        std::shared_ptr<Node> myPad = Pad({1, 1, 1, 1}, "mypad", PadBorderType::Wrap);
+        std::shared_ptr<Node> myPad = Pad<2>({1, 1, 1, 1}, "mypad", PadBorderType::Wrap);
         myPad->getOperator()->setDatatype(DataType::Int32);
         myPad->getOperator()->setBackend("cpu");
         std::shared_ptr<Tensor> myInput = std::make_shared<Tensor>(Array4D<int,2,3,5,5> { //NCHW
-- 
GitLab