ArmNN
 22.05
arm::pipe Namespace Reference

Classes

class  Connection
 
class  Entity
 
class  EventClassObj
 
class  EventObj
 
class  MockBufferManager
 
class  MockCounterDirectory
 
class  MockPacketBuffer
 
class  MockProfilingConnection
 
class  MockProfilingConnectionFactory
 
class  MockProfilingService
 
class  MockProfilingServiceStatus
 
class  MockSendCounterPacket
 
class  MockStreamCounterBuffer
 
struct  ModelRelationship
 
class  PrintPacketHeaderHandler
 
class  ProfilingServiceRuntimeHelper
 
class  RequestCountersPacketHandler
 
class  SendCounterPacketTest
 
struct  StreamRedirector
 
class  SwapProfilingConnectionFactoryHelper
 
class  TestFunctorA
 
class  TestFunctorB
 
class  TestFunctorC
 
class  TestProfilingConnectionArmnnError
 
class  TestProfilingConnectionBadAckPacket
 
class  TestProfilingConnectionBase
 
class  TestProfilingConnectionTimeoutError
 
class  TestTimelinePacketHandler
 
class  TimelineMessageDecoder
 
class  TimelineModel
 

Typedefs

using LabelMap = std::map< uint64_t, arm::pipe::ITimelineDecoder::Label >
 
using Attribute = std::pair< std::string, std::string >
 
using Attributes = std::map< std::string, Attribute >
 
using Entities = std::map< uint64_t, Entity >
 
using Relationships = std::map< uint64_t, ModelRelationship >
 
using EventClasses = std::map< uint64_t, EventClassObj >
 
using Events = std::map< uint64_t, EventObj >
 

Functions

ProfilingOptions ConvertExternalProfilingOptions (const armnn::IRuntime::CreationOptions::ExternalProfilingOptions &options)
 
std::vector< std::string > GetModelDescription (const TimelineModel &model)
 
std::string GetEntityDescription (const Entity &entity)
 
std::string GetChildDescription (Entity *entity)
 
std::string GetConnectionDescription (const Connection &connection)
 
std::string GetExecutionDescription (Entity *execution)
 
std::string GetEventDescription (EventObj *event)
 

Typedef Documentation

◆ Attribute

using Attribute = std::pair<std::string, std::string>

Definition at line 21 of file TimelineModel.hpp.

◆ Attributes

using Attributes = std::map<std::string, Attribute>

Definition at line 22 of file TimelineModel.hpp.

◆ Entities

using Entities = std::map<uint64_t, Entity>

Definition at line 136 of file TimelineModel.hpp.

◆ EventClasses

using EventClasses = std::map<uint64_t, EventClassObj>

Definition at line 144 of file TimelineModel.hpp.

◆ Events

using Events = std::map<uint64_t, EventObj>

Definition at line 145 of file TimelineModel.hpp.

◆ LabelMap

using LabelMap = std::map<uint64_t, arm::pipe::ITimelineDecoder::Label>

Definition at line 20 of file TimelineModel.hpp.

◆ Relationships

using Relationships = std::map<uint64_t, ModelRelationship>

Definition at line 143 of file TimelineModel.hpp.

Function Documentation

◆ ConvertExternalProfilingOptions()

ProfilingOptions ConvertExternalProfilingOptions ( const armnn::IRuntime::CreationOptions::ExternalProfilingOptions options)

Definition at line 17 of file ProfilingOptionsConverter.cpp.

References IRuntime::CreationOptions::ExternalProfilingOptions::m_CapturePeriod, IRuntime::CreationOptions::ExternalProfilingOptions::m_EnableProfiling, IRuntime::CreationOptions::ExternalProfilingOptions::m_FileFormat, IRuntime::CreationOptions::ExternalProfilingOptions::m_FileOnly, IRuntime::CreationOptions::ExternalProfilingOptions::m_IncomingCaptureFile, IRuntime::CreationOptions::ExternalProfilingOptions::m_LocalPacketHandlers, IRuntime::CreationOptions::ExternalProfilingOptions::m_OutgoingCaptureFile, and IRuntime::CreationOptions::ExternalProfilingOptions::m_TimelineEnabled.

Referenced by CheckInferenceTimeThreshold(), RuntimeImpl::RuntimeImpl(), TEST_SUITE(), and VerifyPostOptimisationStructureTestImpl().

19 {
20  ProfilingOptions convertedOptions;
21  convertedOptions.m_EnableProfiling = options.m_EnableProfiling;
22  convertedOptions.m_TimelineEnabled = options.m_TimelineEnabled;
23  convertedOptions.m_OutgoingCaptureFile = options.m_OutgoingCaptureFile;
24  convertedOptions.m_IncomingCaptureFile = options.m_IncomingCaptureFile;
25  convertedOptions.m_FileOnly = options.m_FileOnly;
26  convertedOptions.m_CapturePeriod = options.m_CapturePeriod;
27  convertedOptions.m_FileFormat = options.m_FileFormat;
28  std::copy(options.m_LocalPacketHandlers.begin(), options.m_LocalPacketHandlers.end(),
29  std::back_inserter(convertedOptions.m_LocalPacketHandlers));
30  return convertedOptions;
31 }
std::string m_OutgoingCaptureFile
Path to a file in which outgoing timeline profiling messages will be stored.
Definition: IRuntime.hpp:142
std::vector< arm::pipe::ILocalPacketHandlerSharedPtr > m_LocalPacketHandlers
Definition: IRuntime.hpp:151
std::string m_IncomingCaptureFile
Path to a file in which incoming timeline profiling messages will be stored.
Definition: IRuntime.hpp:144
bool m_EnableProfiling
Indicates whether external profiling is enabled or not.
Definition: IRuntime.hpp:138
bool m_FileOnly
Enable profiling output to file only.
Definition: IRuntime.hpp:146
uint32_t m_CapturePeriod
The duration at which captured profiling messages will be flushed.
Definition: IRuntime.hpp:148
bool m_TimelineEnabled
Indicates whether external timeline profiling is enabled or not.
Definition: IRuntime.hpp:140
std::string m_FileFormat
The format of the file used for outputting profiling data.
Definition: IRuntime.hpp:150

◆ GetChildDescription()

std::string GetChildDescription ( Entity entity)

Definition at line 374 of file TimelineModel.cpp.

References GetEntityDescription().

Referenced by TimelineModel::GetEventClasses(), and GetModelDescription().

375 {
376  std::stringstream ss;
377  ss << " child: " << GetEntityDescription(*entity);
378  return ss.str();
379 }
std::string GetEntityDescription(const Entity &entity)

◆ GetConnectionDescription()

std::string GetConnectionDescription ( const Connection connection)

Definition at line 381 of file TimelineModel.cpp.

References Connection::GetGuid(), Entity::GetGuid(), Connection::GetHead(), and Connection::GetTail().

Referenced by TimelineModel::GetEventClasses(), and GetModelDescription().

382 {
383  std::stringstream ss;
384  ss << " connection [" << connection.GetGuid() << "] from entity [";
385  ss << connection.GetHead()->GetGuid() << "] to entity [" << connection.GetTail()->GetGuid() << "]";
386  return ss.str();
387 }

◆ GetEntityDescription()

std::string GetEntityDescription ( const Entity entity)

Definition at line 357 of file TimelineModel.cpp.

References Entity::GetAttributes(), and Entity::GetGuid().

Referenced by GetChildDescription(), TimelineModel::GetEventClasses(), GetExecutionDescription(), and GetModelDescription().

358 {
359  std::stringstream ss;
360  ss << "Entity [" << entity.GetGuid() << "]";
361  for (auto& attributeEntry : entity.GetAttributes())
362  {
363  if (LabelsAndEventClasses::PROCESS_ID_LABEL == attributeEntry.second.first)
364  {
365  ss << " " << attributeEntry.second.first << " = [processId]";
366  }
367  else {
368  ss << " " << attributeEntry.second.first << " = " << attributeEntry.second.second;
369  }
370  }
371  return ss.str();
372 }

◆ GetEventDescription()

std::string GetEventDescription ( EventObj event)

Definition at line 396 of file TimelineModel.cpp.

Referenced by TimelineModel::GetEventClasses(), and GetModelDescription().

397 {
398  std::stringstream ss;
399  ss << " event: [" << event->GetGuid() << "] class [" << event->GetEventClass() << "]";
400  return ss.str();
401 }

◆ GetExecutionDescription()

std::string GetExecutionDescription ( Entity execution)

Definition at line 389 of file TimelineModel.cpp.

References GetEntityDescription().

Referenced by TimelineModel::GetEventClasses(), and GetModelDescription().

390 {
391  std::stringstream ss;
392  ss << " execution: " << GetEntityDescription(*execution);
393  return ss.str();
394 }
std::string GetEntityDescription(const Entity &entity)

◆ GetModelDescription()

std::vector< std::string > GetModelDescription ( const TimelineModel model)

Definition at line 330 of file TimelineModel.cpp.

References GetChildDescription(), GetConnectionDescription(), TimelineModel::GetEntities(), GetEntityDescription(), GetEventDescription(), and GetExecutionDescription().

Referenced by TimelineModel::GetEventClasses(), and TEST_SUITE().

331 {
332  std::vector<std::string> desc;
333  for (auto& entry : model.GetEntities())
334  {
335  auto& entity = entry.second;
336  desc.push_back(GetEntityDescription(entity));
337  for (auto& connection : entity.GetConnections())
338  {
339  desc.push_back(GetConnectionDescription(connection));
340  }
341  for (auto child : entity.GetChildren())
342  {
343  desc.push_back(GetChildDescription(child));
344  }
345  for (auto execution : entity.GetExecutions())
346  {
347  desc.push_back(GetExecutionDescription(execution));
348  }
349  for (auto event : entity.GetEvents())
350  {
351  desc.push_back(GetEventDescription(event));
352  }
353  }
354  return desc;
355 }
std::string GetEventDescription(EventObj *event)
std::string GetEntityDescription(const Entity &entity)
std::string GetConnectionDescription(const Connection &connection)
std::string GetExecutionDescription(Entity *execution)
std::string GetChildDescription(Entity *entity)