aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/ProfilerTests.cpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2021-08-04 10:35:20 +0100
committerKeithARM <keith.davis@arm.com>2021-08-05 08:11:06 +0000
commit5a64f22101ecdda4846e9d71428633f3ccd56fb2 (patch)
tree5d5dcb617bf2c2786b37a7c64bb6c54ca5696914 /src/armnn/test/ProfilerTests.cpp
parent8c999dfeeca7b02a6ea1d0cdcd8c34472f6c9cce (diff)
downloadarmnn-5a64f22101ecdda4846e9d71428633f3ccd56fb2.tar.gz
IVGCVSW-5980 Add Descriptor, TensorInfo and Convolution algorithm to JSON
* Add GUID as field to layer details and profiling events * Add Optional GUID param to existing tests * Improve Details macro to be inline function * Fix some formatting Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I66f192a90a7642b3ee8e7dda0d3f428cce002581
Diffstat (limited to 'src/armnn/test/ProfilerTests.cpp')
-rw-r--r--src/armnn/test/ProfilerTests.cpp35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/armnn/test/ProfilerTests.cpp b/src/armnn/test/ProfilerTests.cpp
index b27ad5a7a5..8fd97179f1 100644
--- a/src/armnn/test/ProfilerTests.cpp
+++ b/src/armnn/test/ProfilerTests.cpp
@@ -4,16 +4,13 @@
//
#include <armnn/IRuntime.hpp>
-#include <armnn/TypesUtils.hpp>
-#include <armnn/utility/IgnoreUnused.hpp>
#include <doctest/doctest.h>
-#include <memory>
#include <thread>
-#include <ostream>
#include <Profiling.hpp>
+#include <armnn/Optional.hpp>
namespace armnn
{
@@ -216,7 +213,10 @@ TEST_CASE("WriteEventResults")
// Need to directly create a ScopedProfilingEvent as the one created by the macro falls out of scope
// immediately causing the Event.Stop() function method to be called immediately after the Event.Start()
// function resulting in periodic test failures on the Dent and Smith HiKeys
- armnn::ScopedProfilingEvent testEvent(armnn::Compute::CpuAcc, "test", armnn::WallClockTimer());
+ armnn::ScopedProfilingEvent testEvent(armnn::Compute::CpuAcc,
+ armnn::EmptyOptional(),
+ "test",
+ armnn::WallClockTimer());
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
@@ -288,18 +288,33 @@ TEST_CASE("ProfilerJsonPrinter")
{
// Test scoped macro.
- ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc, "EnqueueWorkload", TestInstrument())
- ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc, "Level 0", TestInstrument())
+ ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc,
+ armnn::EmptyOptional(),
+ "EnqueueWorkload",
+ TestInstrument())
+ ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc,
+ armnn::EmptyOptional(),
+ "Level 0",
+ TestInstrument())
{
{
- ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc, "Level 1A", TestInstrument())
+ ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc,
+ armnn::EmptyOptional(),
+ "Level 1A",
+ TestInstrument())
}
{
- ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc, "Level 1B", TestInstrument())
+ ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc,
+ armnn::EmptyOptional(),
+ "Level 1B",
+ TestInstrument())
{
- ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc, "Level 2A", TestInstrument())
+ ARMNN_SCOPED_PROFILING_EVENT_WITH_INSTRUMENTS(armnn::Compute::CpuAcc,
+ armnn::EmptyOptional(),
+ "Level 2A",
+ TestInstrument())
}
}
}