MCPcopy Create free account
hub / github.com/ARM-software/armnn / SendNetworkStructure

Method SendNetworkStructure

src/armnn/LoadedNetwork.cpp:583–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581}
582
583void LoadedNetwork::SendNetworkStructure(arm::pipe::IProfilingService& profilingService)
584{
585 ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "LoadNetwork_SendNetworkStructure");
586 Graph& order = m_OptimizedNetwork->pOptimizedNetworkImpl->GetGraph().TopologicalSort();
587 ProfilingGuid networkGuid = m_OptimizedNetwork->GetGuid();
588
589 std::unique_ptr<TimelineUtilityMethods> timelineUtils =
590 TimelineUtilityMethods::GetTimelineUtils(profilingService);
591
592 timelineUtils->CreateTypedEntity(networkGuid, LabelsAndEventClasses::NETWORK_GUID);
593
594 for (auto&& layer : order)
595 {
596 // Add layer to the post-optimisation network structure
597 AddLayerStructure(timelineUtils, *layer, networkGuid);
598 switch (layer->GetType())
599 {
600 case LayerType::Input:
601 case LayerType::Output:
602 {
603 // Inputs and outputs are treated in a special way - see EnqueueInput() and EnqueueOutput().
604 break;
605 }
606 default:
607 {
608 for (auto& workload : m_WorkloadQueue)
609 {
610 // Add workload to the post-optimisation network structure
611 AddWorkloadStructure(timelineUtils, workload, *layer);
612 }
613 break;
614 }
615 }
616 }
617 // Commit to send the post-optimisation network structure
618 timelineUtils->Commit();
619}
620
621ProfilingGuid LoadedNetwork::GetNetworkGuid()
622{

Callers 1

ReportStructureMethod · 0.80

Calls 6

AddLayerStructureFunction · 0.85
AddWorkloadStructureFunction · 0.85
CreateTypedEntityMethod · 0.80
GetGuidMethod · 0.45
GetTypeMethod · 0.45
CommitMethod · 0.45

Tested by

no test coverage detected