diff --git a/unit_tests/operator/Test_BitShift.cpp b/unit_tests/operator/Test_BitShift.cpp index db97e8d30b5e7121b096f99f8722a69e6d4e367c..33ab932e296be717604be42716d7abe2b61f65ee 100644 --- a/unit_tests/operator/Test_BitShift.cpp +++ b/unit_tests/operator/Test_BitShift.cpp @@ -136,8 +136,8 @@ TEST_CASE("[cpu/operator] BitShift_TEST", "[BitShift][CPU]") { } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {}μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {}μs\n", duration.count()); } SECTION("Test BitShift kernels with Broadcasting") { std::size_t number_of_operation = 0; @@ -236,8 +236,8 @@ TEST_CASE("[cpu/operator] BitShift_TEST", "[BitShift][CPU]") { const std::size_t nb_elements = std::accumulate(dimsOut.cbegin(), dimsOut.cend(), std::size_t(1), std::multiplies<std::size_t>()); number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {}μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {}μs\n", duration.count()); } } diff --git a/unit_tests/operator/Test_ClipImpl.cpp b/unit_tests/operator/Test_ClipImpl.cpp index 1a7aa5e548a4e6b93c0052758fb9210fd8b14818..99147ac93bd659dd91897f6b7f1f3f33e5552ef6 100644 --- a/unit_tests/operator/Test_ClipImpl.cpp +++ b/unit_tests/operator/Test_ClipImpl.cpp @@ -119,8 +119,8 @@ TEST_CASE("[cpu/operator] Clip", "[Clip][CPU]") REQUIRE(approxEq<float>(*(op->getOutput(0)), *Tres)); } - fmt::print("INFO: multiplications over time spent: {}\n", totalComputation/duration.count()); - fmt::print("INFO: total time: {}\n", duration.count()); + Log::info("multiplications over time spent: {}\n", totalComputation/duration.count()); + Log::info("total time: {}\n", duration.count()); } SECTION("Clip test with min >= max [Forward]") { std::size_t totalComputation = 0; @@ -179,8 +179,8 @@ TEST_CASE("[cpu/operator] Clip", "[Clip][CPU]") REQUIRE(approxEq<float>(*(op->getOutput(0)), *Tres)); } - fmt::print("INFO: multiplications over time spent: {}\n", totalComputation/duration.count()); - fmt::print("INFO: total time: {}\n", duration.count()); + Log::info("multiplications over time spent: {}\n", totalComputation/duration.count()); + Log::info("total time: {}\n", duration.count()); } SECTION("Clip with Clip Attr [Forward]") { @@ -232,8 +232,8 @@ TEST_CASE("[cpu/operator] Clip", "[Clip][CPU]") REQUIRE(approxEq<float>(*(op->getOutput(0)), *Tres)); } - fmt::print("INFO: multiplications over time spent: {}\n", totalComputation/duration.count()); - fmt::print("INFO: total time: {}\n", duration.count()); + Log::info("multiplications over time spent: {}\n", totalComputation/duration.count()); + Log::info("total time: {}\n", duration.count()); } SECTION("Simple clip test [Backward]") { std::size_t totalComputation = 0; @@ -311,8 +311,8 @@ TEST_CASE("[cpu/operator] Clip", "[Clip][CPU]") duration += std::chrono::duration_cast<std::chrono::microseconds>(end - start); REQUIRE(GT1 == BackwardTensorVec); } - fmt::print("INFO: multiplications over time spent: {}\n", totalComputation/duration.count()); - fmt::print("INFO: total time: {}\n", duration.count()); + Log::info("multiplications over time spent: {}\n", totalComputation/duration.count()); + Log::info("total time: {}\n", duration.count()); } } } // namespace Aidge diff --git a/unit_tests/operator/Test_DivImpl.cpp b/unit_tests/operator/Test_DivImpl.cpp index b03fe4aa91e96299f2a748026ee8ca5e5d57fb5c..4037b2ad4e117573279f07d0c1819d3435ee7ada 100644 --- a/unit_tests/operator/Test_DivImpl.cpp +++ b/unit_tests/operator/Test_DivImpl.cpp @@ -126,8 +126,8 @@ TEST_CASE("[cpu/operator] Div", "[Div][CPU]") { // with broadcasting } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("+1-D Tensor / +1-D Tensor - broadcasting") { @@ -221,8 +221,8 @@ TEST_CASE("[cpu/operator] Div", "[Div][CPU]") { const std::size_t nb_elements = std::accumulate(dimsOut.cbegin(), dimsOut.cend(), std::size_t(1), std::multiplies<std::size_t>()); number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -317,8 +317,8 @@ TEST_CASE("[cpu/operator] Div", "[Div][CPU]") { number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } } } diff --git a/unit_tests/operator/Test_GlobalAveragePoolingImpl.cpp b/unit_tests/operator/Test_GlobalAveragePoolingImpl.cpp index 63f8d3269cdb25a6d84c3e936d8f124b0964962d..8e8536accadcb874f74d4d962aae435bc1351d6e 100644 --- a/unit_tests/operator/Test_GlobalAveragePoolingImpl.cpp +++ b/unit_tests/operator/Test_GlobalAveragePoolingImpl.cpp @@ -554,9 +554,9 @@ TEST_CASE("[cpu/operator] GlobalAveragePooling", delete[] result; } } - fmt::print("INFO: GlobalAveragePooling total execution time: {}µs\n", duration.count()); - fmt::print("INFO: Number of operations : {}\n", number_of_operation); - fmt::print("INFO: Operation / µs = {}\n", number_of_operation / duration.count()); + Log::info("GlobalAveragePooling total execution time: {}µs\n", duration.count()); + Log::info("Number of operations : {}\n", number_of_operation); + Log::info("Operation / µs = {}\n", number_of_operation / duration.count()); } } } diff --git a/unit_tests/operator/Test_MatMulImpl.cpp b/unit_tests/operator/Test_MatMulImpl.cpp index daef47b32ffcca880a1bf2438e9ee9c35adbb2c8..f062f06cddfbd04217d63e1edcb6505914bc77e9 100644 --- a/unit_tests/operator/Test_MatMulImpl.cpp +++ b/unit_tests/operator/Test_MatMulImpl.cpp @@ -111,8 +111,8 @@ TEST_CASE("[cpu/operator] MatMul(forward)", "[MatMul][CPU]") { delete[] bigArray2; delete[] res; } - fmt::print("INFO: number of multiplications over time spent: {}\n", (totalComputation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of multiplications over time spent: {}\n", (totalComputation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("3-D Tensors") { @@ -179,8 +179,8 @@ TEST_CASE("[cpu/operator] MatMul(forward)", "[MatMul][CPU]") { delete[] bigArray2; delete[] res; } - fmt::print("INFO: number of multiplications over time spent: {}\n", (totalComputation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of multiplications over time spent: {}\n", (totalComputation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("4-D Tensors") { @@ -249,8 +249,8 @@ TEST_CASE("[cpu/operator] MatMul(forward)", "[MatMul][CPU]") { delete[] bigArray2; delete[] res; } - fmt::print("INFO: number of multiplications over time spent: {}\n", (totalComputation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of multiplications over time spent: {}\n", (totalComputation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("+2-D / 1-D") { diff --git a/unit_tests/operator/Test_MulImpl.cpp b/unit_tests/operator/Test_MulImpl.cpp index 925b9f2059518d434b74a0e2fd0cde79b334c54e..b5f5172542ff560400d3033d190f48738b34035d 100644 --- a/unit_tests/operator/Test_MulImpl.cpp +++ b/unit_tests/operator/Test_MulImpl.cpp @@ -437,8 +437,8 @@ TEST_CASE("[cpu/operator] Mul", "[Mul][CPU]") { delete[] array1; delete[] result; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } @@ -568,8 +568,8 @@ TEST_CASE("[cpu/operator] Mul", "[Mul][CPU]") { const std::size_t nb_elements = std::accumulate(dimsOut.cbegin(), dimsOut.cend(), std::size_t(1), std::multiplies<std::size_t>()); number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -664,8 +664,8 @@ TEST_CASE("[cpu/operator] Mul", "[Mul][CPU]") { number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } } } diff --git a/unit_tests/operator/Test_PowImpl.cpp b/unit_tests/operator/Test_PowImpl.cpp index 8238da3970740f4b8d6095d7a28c000319ea004e..55a416c3f404506359e06f9937dd958503236901 100644 --- a/unit_tests/operator/Test_PowImpl.cpp +++ b/unit_tests/operator/Test_PowImpl.cpp @@ -126,8 +126,8 @@ TEST_CASE("[cpu/operator] Pow", "[Pow][CPU]") { // with broadcasting } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("+1-D Tensor / +1-D Tensor - broadcasting") { @@ -221,8 +221,8 @@ TEST_CASE("[cpu/operator] Pow", "[Pow][CPU]") { const std::size_t nb_elements = std::accumulate(dimsOut.cbegin(), dimsOut.cend(), std::size_t(1), std::multiplies<std::size_t>()); number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -317,8 +317,8 @@ TEST_CASE("[cpu/operator] Pow", "[Pow][CPU]") { number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } } diff --git a/unit_tests/operator/Test_RoundImpl.cpp b/unit_tests/operator/Test_RoundImpl.cpp index 8b5dd53a79242a38063f178807d5b6b40f2c0e96..e658b0616683633ce19b2284abb9d4fae7942a23 100644 --- a/unit_tests/operator/Test_RoundImpl.cpp +++ b/unit_tests/operator/Test_RoundImpl.cpp @@ -108,8 +108,8 @@ TEST_CASE("[cpu/operator] Round_Test", "[Round][CPU]") { } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {} μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {} μs\n", duration.count()); } } } // namespace Aidge diff --git a/unit_tests/operator/Test_SubImpl.cpp b/unit_tests/operator/Test_SubImpl.cpp index 471ae560a35b480945d7e5c85fb93bbbc8d459f6..1317e88a371e9a6e7a3deae5b7f662a9cd879a60 100644 --- a/unit_tests/operator/Test_SubImpl.cpp +++ b/unit_tests/operator/Test_SubImpl.cpp @@ -126,8 +126,8 @@ TEST_CASE("[cpu/operator] Sub", "[Sub][CPU]") { // with broadcasting } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {}μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {}μs\n", duration.count()); } SECTION("+1-D Tensor / +1-D Tensor - broadcasting") { @@ -221,8 +221,8 @@ TEST_CASE("[cpu/operator] Sub", "[Sub][CPU]") { const std::size_t nb_elements = std::accumulate(dimsOut.cbegin(), dimsOut.cend(), std::size_t(1), std::multiplies<std::size_t>()); number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {}μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {}μs\n", duration.count()); } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -317,8 +317,8 @@ TEST_CASE("[cpu/operator] Sub", "[Sub][CPU]") { number_of_operation += nb_elements; } - fmt::print("INFO: number of elements over time spent: {}\n", (number_of_operation / duration.count())); - fmt::print("INFO: total time: {}μs\n", duration.count()); + Log::info("number of elements over time spent: {}\n", (number_of_operation / duration.count())); + Log::info("total time: {}μs\n", duration.count()); } } }