diff --git a/unit_tests/operator/Test_DivImpl.cpp b/unit_tests/operator/Test_DivImpl.cpp index 62130b623968dae9a42f5960ca4d44a00b1aa5c1..a0ed261fe9622f36a9bb2e46c4796ae7f6f8f5e6 100644 --- a/unit_tests/operator/Test_DivImpl.cpp +++ b/unit_tests/operator/Test_DivImpl.cpp @@ -25,7 +25,7 @@ namespace Aidge { TEST_CASE("[cpu/operator] Div", "[Div][CPU]") { - constexpr std::uint16_t NBTRIALS = 1000; + constexpr std::uint16_t NBTRIALS = 10; // Create a random number generator std::random_device rd; std::mt19937 gen(rd()); @@ -117,7 +117,7 @@ TEST_CASE("[cpu/operator] Div", "[Div][CPU]") { // with broadcasting } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } @@ -212,6 +212,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; } + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "total time: " << duration.count() << "μs" << std::endl; } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -306,7 +308,7 @@ TEST_CASE("[cpu/operator] Div", "[Div][CPU]") { number_of_operation += nb_elements; } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } } diff --git a/unit_tests/operator/Test_MulImpl.cpp b/unit_tests/operator/Test_MulImpl.cpp index 759a8673e8765ed6231098b62d9ed2215bbe284c..5b5a05764ecb0298a08c3e9ceece448d46e63044 100644 --- a/unit_tests/operator/Test_MulImpl.cpp +++ b/unit_tests/operator/Test_MulImpl.cpp @@ -117,7 +117,7 @@ TEST_CASE("[cpu/operator] Mul", "[Mul][CPU]") { // with broadcasting } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } @@ -212,6 +212,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; } + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "total time: " << duration.count() << "μs" << std::endl; } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -306,7 +308,7 @@ TEST_CASE("[cpu/operator] Mul", "[Mul][CPU]") { number_of_operation += nb_elements; } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } } diff --git a/unit_tests/operator/Test_PowImpl.cpp b/unit_tests/operator/Test_PowImpl.cpp index eed59fe6bdacc468e4d6bb212d3eaa1425c99376..01f9760275923b2249e5b6098b83b4ae27d5fb30 100644 --- a/unit_tests/operator/Test_PowImpl.cpp +++ b/unit_tests/operator/Test_PowImpl.cpp @@ -118,7 +118,7 @@ TEST_CASE("[cpu/operator] Pow", "[Pow][CPU]") { // with broadcasting } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } @@ -213,6 +213,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; } + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "total time: " << duration.count() << "μs" << std::endl; } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -307,7 +309,7 @@ TEST_CASE("[cpu/operator] Pow", "[Pow][CPU]") { number_of_operation += nb_elements; } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } } diff --git a/unit_tests/operator/Test_SubImpl.cpp b/unit_tests/operator/Test_SubImpl.cpp index 4b891e98881651d1704dedc6423dc48659292ccb..f9ba894f081b76b3abd0f0909636a38eaee3601a 100644 --- a/unit_tests/operator/Test_SubImpl.cpp +++ b/unit_tests/operator/Test_SubImpl.cpp @@ -25,7 +25,7 @@ namespace Aidge { TEST_CASE("[cpu/operator] Sub", "[Sub][CPU]") { - constexpr std::uint16_t NBTRIALS = 1000; + constexpr std::uint16_t NBTRIALS = 10; // Create a random number generator std::random_device rd; std::mt19937 gen(rd()); @@ -117,7 +117,7 @@ TEST_CASE("[cpu/operator] Sub", "[Sub][CPU]") { // with broadcasting } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } @@ -212,6 +212,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; } + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "total time: " << duration.count() << "μs" << std::endl; } SECTION("+1-D Tensor / 1-D Tensor") { std::size_t number_of_operation = 0; @@ -306,7 +308,7 @@ TEST_CASE("[cpu/operator] Sub", "[Sub][CPU]") { number_of_operation += nb_elements; } - std::cout << "multiplications over time spent: " << (number_of_operation / duration.count())<< std::endl; + std::cout << "number of elements over time spent: " << (number_of_operation / duration.count())<< std::endl; std::cout << "total time: " << duration.count() << "μs" << std::endl; } }