aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/RuntimeTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/test/RuntimeTests.cpp')
-rw-r--r--src/armnn/test/RuntimeTests.cpp40
1 files changed, 38 insertions, 2 deletions
diff --git a/src/armnn/test/RuntimeTests.cpp b/src/armnn/test/RuntimeTests.cpp
index 7e9acb7d79..12ec8b1ece 100644
--- a/src/armnn/test/RuntimeTests.cpp
+++ b/src/armnn/test/RuntimeTests.cpp
@@ -6,6 +6,7 @@
#include <armnn/Descriptors.hpp>
#include <armnn/IRuntime.hpp>
#include <armnn/INetwork.hpp>
+#include <Processes.hpp>
#include <Runtime.hpp>
#include <armnn/TypesUtils.hpp>
@@ -414,7 +415,6 @@ BOOST_AUTO_TEST_CASE(ProfilingEnableCpuRef)
BOOST_CHECK(readableBuffer != nullptr);
unsigned int size = readableBuffer->GetSize();
- BOOST_CHECK(size == 772);
const unsigned char* readableData = readableBuffer->GetReadableData();
BOOST_CHECK(readableData != nullptr);
@@ -422,7 +422,7 @@ BOOST_AUTO_TEST_CASE(ProfilingEnableCpuRef)
unsigned int offset = 0;
// Verify Header
- VerifyTimelineHeaderBinary(readableData, offset, 764);
+ VerifyTimelineHeaderBinary(readableData, offset, size - 8);
BOOST_TEST_MESSAGE("HEADER OK");
// Post-optimisation network
@@ -440,6 +440,42 @@ BOOST_AUTO_TEST_CASE(ProfilingEnableCpuRef)
offset);
BOOST_TEST_MESSAGE("NETWORK TYPE RELATIONSHIP OK");
+ // Network - START OF LIFE
+ ProfilingGuid networkSolEventGuid = VerifyTimelineEventBinaryPacket(EmptyOptional(),
+ EmptyOptional(),
+ EmptyOptional(),
+ readableData,
+ offset);
+ BOOST_TEST_MESSAGE("NETWORK START OF LIFE EVENT OK");
+
+ // Network - START OF LIFE event relationship
+ VerifyTimelineRelationshipBinaryPacketData(ProfilingRelationshipType::ExecutionLink,
+ EmptyOptional(),
+ optNetGuid,
+ networkSolEventGuid,
+ LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS,
+ readableData,
+ offset);
+ BOOST_TEST_MESSAGE("NETWORK START OF LIFE RELATIONSHIP OK");
+
+ // Process ID Label
+ int processID = armnnUtils::Processes::GetCurrentId();
+ std::stringstream ss;
+ ss << processID;
+ std::string processIdLabel = ss.str();
+ VerifyTimelineLabelBinaryPacketData(EmptyOptional(), processIdLabel, readableData, offset);
+ BOOST_TEST_MESSAGE("PROCESS ID LABEL OK");
+
+ // Entity - Process ID relationship
+ VerifyTimelineRelationshipBinaryPacketData(ProfilingRelationshipType::LabelLink,
+ EmptyOptional(),
+ optNetGuid,
+ EmptyOptional(),
+ LabelsAndEventClasses::PROCESS_ID_GUID,
+ readableData,
+ offset);
+ BOOST_TEST_MESSAGE("NETWORK PROCESS ID RELATIONSHIP OK");
+
// Input layer
// Input layer entity
VerifyTimelineEntityBinaryPacketData(input->GetGuid(), readableData, offset);