From 8536d095262ceb19fa960c325b395fe010c0c6d6 Mon Sep 17 00:00:00 2001
From: Olivier BICHLER <olivier.bichler@cea.fr>
Date: Sun, 10 Dec 2023 22:22:52 +0100
Subject: [PATCH] Fixed types

---
 unit_tests/Test_Convert.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/unit_tests/Test_Convert.cpp b/unit_tests/Test_Convert.cpp
index 82256da..21f9d43 100644
--- a/unit_tests/Test_Convert.cpp
+++ b/unit_tests/Test_Convert.cpp
@@ -114,12 +114,12 @@ TEST_CASE("[cuda/convert] Convert(forward)") {
         std::shared_ptr<Tensor> other1 = std::static_pointer_cast<OperatorTensor>(g->getNode("conv1")->getOperator())->getOutput(0);
         Tensor hostOther1(other1->dataType());
         hostOther1.copyCastFrom(*other1);
-        REQUIRE(approxEq<float, int>(hostOther1, *expectedOutput1, 0.0, 1.0e-12));
+        REQUIRE(approxEq<half_float::half, int>(hostOther1, *expectedOutput1, 0.0, 1.0e-12));
 
         std::shared_ptr<Tensor> other2 = std::static_pointer_cast<OperatorTensor>(g->getNode("conv2")->getOperator())->getOutput(0);
         Tensor hostOther2(other2->dataType());
         hostOther2.copyCastFrom(*other2);
-        REQUIRE(approxEq<int>(hostOther2, *expectedOutput2, 0.0, 1.0e-12));
+        REQUIRE(approxEq<float, int>(hostOther2, *expectedOutput2, 0.0, 1.0e-12));
 
         std::shared_ptr<Tensor> other3 = std::static_pointer_cast<OperatorTensor>(g->getNode("conv3")->getOperator())->getOutput(0);
         Tensor hostOther3(other3->dataType());
@@ -198,12 +198,12 @@ TEST_CASE("[cuda/convert] Convert(forward)") {
         std::shared_ptr<Tensor> other1 = std::static_pointer_cast<OperatorTensor>(g->getNode("conv1")->getOperator())->getOutput(0);
         Tensor hostOther1(other1->dataType());
         hostOther1.copyCastFrom(*other1);
-        REQUIRE(approxEq<float, int>(hostOther1, *expectedOutput1, 0.0, 1.0e-12));
+        REQUIRE(approxEq<half_float::half, int>(hostOther1, *expectedOutput1, 0.0, 1.0e-12));
 
         std::shared_ptr<Tensor> other2 = std::static_pointer_cast<OperatorTensor>(g->getNode("conv2")->getOperator())->getOutput(0);
         Tensor hostOther2(other2->dataType());
         hostOther2.copyCastFrom(*other2);
-        REQUIRE(approxEq<int>(hostOther2, *expectedOutput2, 0.0, 1.0e-12));
+        REQUIRE(approxEq<float, int>(hostOther2, *expectedOutput2, 0.0, 1.0e-12));
 
         std::shared_ptr<Tensor> other3 = std::static_pointer_cast<OperatorTensor>(g->getNode("conv3")->getOperator())->getOutput(0);
         Tensor hostOther3(other3->dataType());
-- 
GitLab