19 #include <common/include/LabelsAndEventClasses.hpp> 22 #include <condition_variable> 23 #include <unordered_map> 47 std::unique_ptr<IWorkingMemHandle> CreateWorkingMemHandle(
NetworkId networkId);
60 static std::unique_ptr<LoadedNetwork> MakeLoadedNetwork(std::unique_ptr<IOptimizedNetwork> net,
61 std::string& errorMessage,
68 const std::shared_ptr<IProfiler>&
GetProfiler()
const {
return m_Profiler; }
70 void FreeWorkingMemory();
74 void SendNetworkStructure();
78 return m_NetworkProperties.m_AsyncEnabled;
81 profiling::ProfilingGuid GetNetworkGuid();
84 using WorkloadFactoryWithMemoryManager =
85 std::pair<IBackendInternal::IWorkloadFactoryPtr, IBackendInternal::IMemoryManagerSharedPtr>;
87 using WorkloadFactoryMap = std::unordered_map<BackendId, WorkloadFactoryWithMemoryManager>;
89 void AllocateWorkingMemory(std::lock_guard<std::mutex>& lock);
90 void AllocateAndExecuteConstantWorkloads();
92 std::unordered_map<LayerGuid, ITensorHandle* > m_ConstantTensorHandles;
93 std::unordered_map<LayerGuid, std::unique_ptr<IWorkload> > m_ConstantWorkloads;
107 bool Execute(std::unique_ptr<profiling::TimelineUtilityMethods>& timelineUtils,
108 profiling::ProfilingGuid inferenceGuid);
112 using BackendPtrMap = std::unordered_map<BackendId, IBackendInternalUniquePtr>;
114 BackendPtrMap m_Backends;
115 WorkloadFactoryMap m_WorkloadFactories;
117 std::unique_ptr<IOptimizedNetwork> m_OptimizedNetwork;
118 std::shared_ptr<IProfiler> m_Profiler;
124 mutable std::mutex m_WorkingMemMutex;
126 bool m_IsWorkingMemAllocated =
false;
std::vector< std::pair< LayerBindingId, class ConstTensor > > InputTensors
Copyright (c) 2021 ARM Limited and Contributors.
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).
A tensor defined by a TensorInfo (shape and data type) and a mutable backing store.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
std::vector< std::pair< LayerBindingId, class Tensor > > OutputTensors
std::vector< std::unique_ptr< IWorkload > > WorkloadQueue
const std::shared_ptr< IProfiler > & GetProfiler() const