22 #include <unordered_map> 45 static std::unique_ptr<LoadedNetwork> MakeLoadedNetwork(std::unique_ptr<OptimizedNetwork> net,
46 std::string & errorMessage,
53 const std::shared_ptr<Profiler>&
GetProfiler()
const {
return m_Profiler; }
55 void FreeWorkingMemory();
59 void SendNetworkStructure();
64 void AllocateWorkingMemory(std::lock_guard<std::mutex>& lock);
74 bool Execute(std::unique_ptr<profiling::TimelineUtilityMethods>& timelineUtils,
80 using BackendPtrMap = std::unordered_map<BackendId, IBackendInternalUniquePtr>;
82 using WorkloadFactoryWithMemoryManager =
83 std::pair<IBackendInternal::IWorkloadFactoryPtr, IBackendInternal::IMemoryManagerSharedPtr>;
85 using WorkloadFactoryMap = std::unordered_map<BackendId, WorkloadFactoryWithMemoryManager>;
87 BackendPtrMap m_Backends;
88 WorkloadFactoryMap m_WorkloadFactories;
90 std::unique_ptr<OptimizedNetwork> m_OptimizedNetwork;
94 std::shared_ptr<Profiler> m_Profiler;
96 mutable std::mutex m_WorkingMemMutex;
98 bool m_IsWorkingMemAllocated=
false;
99 bool m_IsImportEnabled=
false;
100 bool m_IsExportEnabled=
false;
std::vector< std::unique_ptr< IWorkload > > WorkloadQueue
std::vector< std::pair< LayerBindingId, class ConstTensor > > InputTensors
const std::shared_ptr< Profiler > & GetProfiler() const
Copyright (c) 2020 ARM Limited.
std::function< void(LayerGuid guid, unsigned int slotIndex, ITensorHandle *tensorHandle)> DebugCallbackFunction
Define the type of callback for the Debug layer to call.
int LayerBindingId
Type of identifiers for bindable layers (inputs, outputs).
std::vector< std::pair< LayerBindingId, class Tensor > > OutputTensors
TensorInfo GetInputTensorInfo(const Network *network)