| 581 | } |
| 582 | |
| 583 | void 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 | |
| 621 | ProfilingGuid LoadedNetwork::GetNetworkGuid() |
| 622 | { |
no test coverage detected