diff options
author | David Monahan <david.monahan@arm.com> | 2019-12-02 08:35:43 +0000 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-12-04 15:34:07 +0000 |
commit | 6198fe0f653fb60c938a3c269bf28aeefcdad07e (patch) | |
tree | fad59f7c352d9263efd24a8dde7d94e79dd827b3 /src/profiling/TimelineUtilityMethods.cpp | |
parent | 109c05bc985d25f513444a7caa1e54557ef0f3c0 (diff) | |
download | armnn-6198fe0f653fb60c938a3c269bf28aeefcdad07e.tar.gz |
IVGCVSW-4016 Add the Inference timeline trace and unit tests
Signed-off-by: David Monahan <david.monahan@arm.com>
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I0cfbc2e1ed8f1eded1841866ebf9f39a066e91af
Diffstat (limited to 'src/profiling/TimelineUtilityMethods.cpp')
-rw-r--r-- | src/profiling/TimelineUtilityMethods.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/profiling/TimelineUtilityMethods.cpp b/src/profiling/TimelineUtilityMethods.cpp index d540c5970b..972916104e 100644 --- a/src/profiling/TimelineUtilityMethods.cpp +++ b/src/profiling/TimelineUtilityMethods.cpp @@ -62,6 +62,14 @@ void TimelineUtilityMethods::SendWellKnownLabelsAndEventClasses() m_SendTimelinePacket->SendTimelineLabelBinaryPacket(LabelsAndEventClasses::CONNECTION_GUID, LabelsAndEventClasses::CONNECTION); + // Send the "inference" label, this call throws in case of error + m_SendTimelinePacket->SendTimelineLabelBinaryPacket(LabelsAndEventClasses::INFERENCE_GUID, + LabelsAndEventClasses::INFERENCE); + + // Send the "workload_execution" label, this call throws in case of error + m_SendTimelinePacket->SendTimelineLabelBinaryPacket(LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID, + LabelsAndEventClasses::WORKLOAD_EXECUTION); + // Send the "start of life" event class, this call throws in case of error m_SendTimelinePacket->SendTimelineEventClassBinaryPacket(LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS); @@ -386,6 +394,22 @@ ProfilingDynamicGuid TimelineUtilityMethods::RecordEvent(ProfilingGuid entityGui return eventGuid; } +ProfilingDynamicGuid TimelineUtilityMethods::RecordWorkloadInferenceAndStartOfLifeEvent(ProfilingGuid workloadGuid, + ProfilingGuid inferenceGuid) +{ + ProfilingDynamicGuid workloadInferenceGuid = ProfilingService::Instance().NextGuid(); + CreateTypedEntity(workloadInferenceGuid, LabelsAndEventClasses::WORKLOAD_EXECUTION_GUID); + CreateRelationship(ProfilingRelationshipType::RetentionLink, inferenceGuid, workloadInferenceGuid); + CreateRelationship(ProfilingRelationshipType::RetentionLink, workloadGuid, workloadInferenceGuid); + RecordEvent(workloadInferenceGuid, LabelsAndEventClasses::ARMNN_PROFILING_SOL_EVENT_CLASS); + return workloadInferenceGuid; +} + +void TimelineUtilityMethods::RecordEndOfLifeEvent(ProfilingGuid entityGuid) +{ + RecordEvent(entityGuid, LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS); +} + } // namespace profiling } // namespace armnn |