diff options
Diffstat (limited to 'src/armnn/test')
-rw-r--r-- | src/armnn/test/InstrumentTests.cpp | 18 | ||||
-rw-r--r-- | src/armnn/test/JsonPrinterTests.cpp | 14 | ||||
-rw-r--r-- | src/armnn/test/ProfilingEventTest.cpp | 8 |
3 files changed, 20 insertions, 20 deletions
diff --git a/src/armnn/test/InstrumentTests.cpp b/src/armnn/test/InstrumentTests.cpp index 11d8414296..40ffde8801 100644 --- a/src/armnn/test/InstrumentTests.cpp +++ b/src/armnn/test/InstrumentTests.cpp @@ -13,7 +13,7 @@ using namespace armnn; BOOST_AUTO_TEST_SUITE(Instruments) -BOOST_AUTO_TEST_CASE(WallClockTimerInMilliseconds) +BOOST_AUTO_TEST_CASE(WallClockTimerInMicroseconds) { WallClockTimer wallClockTimer; @@ -22,16 +22,16 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInMilliseconds) // start the timer wallClockTimer.Start(); - // wait for 10 milliseconds - std::this_thread::sleep_for(std::chrono::milliseconds(10)); + // wait for 10 microseconds + std::this_thread::sleep_for(std::chrono::microseconds(10)); // stop the timer wallClockTimer.Stop(); BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME); - // check that WallClockTimer measurement should be >= 10 milliseconds - BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, std::chrono::milliseconds(10).count()); + // check that WallClockTimer measurement should be >= 10 microseconds + BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, std::chrono::microseconds(10).count()); } BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds) @@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds) // start the timer wallClockTimer.Start(); - // wait for 500 nanoseconds - 0.0005 milliseconds + // wait for 500 nanoseconds - 0.5 microseconds std::this_thread::sleep_for(std::chrono::nanoseconds(500)); // stop the timer @@ -51,11 +51,11 @@ BOOST_AUTO_TEST_CASE(WallClockTimerInNanoseconds) BOOST_CHECK_EQUAL(wallClockTimer.GetMeasurements().front().m_Name, WallClockTimer::WALL_CLOCK_TIME); - // delta is 0.0005 milliseconds + // delta is 0.5 microseconds const auto delta = - std::chrono::duration_cast<std::chrono::duration<double, std::milli>>(std::chrono::nanoseconds(500)); + std::chrono::duration_cast<std::chrono::duration<double, std::micro>>(std::chrono::nanoseconds(500)); - // check that WallClockTimer measurement should be >= 0.0005 milliseconds + // check that WallClockTimer measurement should be >= 0.5 microseconds BOOST_CHECK_GE(wallClockTimer.GetMeasurements().front().m_Value, delta.count()); } diff --git a/src/armnn/test/JsonPrinterTests.cpp b/src/armnn/test/JsonPrinterTests.cpp index 01078e3666..aae7dba0f5 100644 --- a/src/armnn/test/JsonPrinterTests.cpp +++ b/src/armnn/test/JsonPrinterTests.cpp @@ -246,7 +246,7 @@ void SetupSoftmaxProfilerWithSpecifiedBackendsAndValidateJSONPrinterResult( std::string backend = "Ref"; std::string changeLine31 = "\n},\n\"CopyMemGeneric_Execute\": {"; - std::string changeLine39 = "ms\""; + std::string changeLine39 = "us\""; std::string changeLine40; std::string changeLine45; @@ -271,7 +271,7 @@ void SetupSoftmaxProfilerWithSpecifiedBackendsAndValidateJSONPrinterResult( , ], -"unit": "ms")"; +"unit": "us")"; changeLine45 = "}\n"; break; case armnn::Compute::CpuAcc: backend = "Neon"; @@ -301,7 +301,7 @@ void SetupSoftmaxProfilerWithSpecifiedBackendsAndValidateJSONPrinterResult( , ], -"unit": "ms")"; +"unit": "us")"; changeLine45 = "}\n"; break; default: @@ -315,21 +315,21 @@ void SetupSoftmaxProfilerWithSpecifiedBackendsAndValidateJSONPrinterResult( , ], -"unit": "ms", +"unit": "us", "layer_measurements": { "raw": [ , , ], -"unit": "ms", +"unit": "us", "CopyMemGeneric_Execute": { "raw": [ , , ], -"unit": "ms" +"unit": "us" }, ")" + backend + R"(SoftmaxUintWorkload_Execute": { "raw": [ @@ -337,7 +337,7 @@ void SetupSoftmaxProfilerWithSpecifiedBackendsAndValidateJSONPrinterResult( , ], -"unit": "ms")" + changeLine31 + R"( +"unit": "us")" + changeLine31 + R"( "raw": [ , , diff --git a/src/armnn/test/ProfilingEventTest.cpp b/src/armnn/test/ProfilingEventTest.cpp index 33396b1a19..9e31ccb323 100644 --- a/src/armnn/test/ProfilingEventTest.cpp +++ b/src/armnn/test/ProfilingEventTest.cpp @@ -32,8 +32,8 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTest) // start the timer - outer testEvent.Start(); - // wait for 10 milliseconds - std::this_thread::sleep_for(std::chrono::milliseconds(10)); + // wait for 10 microseconds + std::this_thread::sleep_for(std::chrono::microseconds(10)); // stop the timer - outer testEvent.Stop(); @@ -74,8 +74,8 @@ BOOST_AUTO_TEST_CASE(ProfilingEventTestOnGpuAcc) // start the timer - outer testEvent.Start(); - // wait for 10 milliseconds - std::this_thread::sleep_for(std::chrono::milliseconds(10)); + // wait for 10 microseconds + std::this_thread::sleep_for(std::chrono::microseconds(10)); // stop the timer - outer testEvent.Stop(); |