24.02
|
Go to the documentation of this file.
22 #include <client/include/backends/IBackendProfiling.hpp>
23 #include <client/include/backends/IBackendProfilingContext.hpp>
30 class IWorkloadFactory;
50 return this == &other ||
51 (this->m_Major == other.
m_Major &&
52 this->m_Minor == other.
m_Minor);
57 return this->m_Major < other.
m_Major ||
58 (this->m_Major == other.
m_Major &&
59 this->m_Minor <= other.
m_Minor);
64 return this->m_Major > other.
m_Major ||
65 (this->m_Major == other.
m_Major &&
66 this->m_Minor >= other.
m_Minor);
72 os <<
"[" << backendVersion.
m_Major <<
"." << backendVersion.
m_Minor <<
"]";
188 std::stringstream message;
189 message <<
"The backend " <<
GetId() <<
" doesn't support using a custom allocator. This error might"
190 " be related with the protected mode if the backend doesn't"
191 " fully support it.";
193 errMsg.
value() = message.str();
203 throw armnn::Exception(
"GetDefaultAllocator: Function has not been implemented in backend.");
218 throw armnn::Exception(
"CreateExecutionData: Function has not been implemented in backend.");
229 throw armnn::Exception(
"UpdateExecutionData: Function has not been implemented in backend.");
ITensorHandleFactory::FactoryId GetBackwardCompatibleFavoriteHandleFactory()
virtual unsigned int GetNumberOfCacheFiles() const
Returns the number of files cached if backend supports caching.
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
BackendOptions BackendCapabilities
virtual ILayerSupportSharedPtr GetLayerSupport() const =0
virtual void UpdateExecutionData(ExecutionData &executionData, WorkingMemDescriptor &workingMemDescriptor) const
Update the ExecutionData for a layer.
unsigned int MemorySourceFlags
virtual IWorkloadFactoryPtr CreateWorkloadFactory(const IMemoryManagerSharedPtr &memoryManager=nullptr) const =0
std::unique_ptr< IBackendContext > IBackendContextPtr
bool operator<=(const BackendVersion &other) const
constexpr BackendVersion()
virtual OptimizationViews OptimizeSubgraphView(const SubgraphView &subgraph) const
IBackendInternal()=default
Creation must be done through a specific backend interface.
virtual ExecutionData CreateExecutionData(WorkingMemDescriptor &workingMemDescriptor) const
Returns ExecutionData for the backend.
virtual const BackendId & GetId() const =0
virtual IBackendContextPtr CreateBackendContext(const IRuntime::CreationOptions &) const
Create the runtime context of the backend.
std::ostream & operator<<(std::ostream &os, const std::vector< Compute > &compute)
Deprecated function that will be removed together with the Compute enum.
virtual std::unique_ptr< ICustomAllocator > GetDefaultAllocator() const
Returns the default memory allocator for the backend.
constexpr BackendVersion(uint32_t major, uint32_t minor)
The SubgraphView class represents a subgraph of a Graph.
virtual IMemoryManagerUniquePtr CreateMemoryManager() const
Each backend should implement an IBackend.
Base class for all ArmNN exceptions so that users can filter to just those.
static constexpr BackendVersion GetApiVersion()
Returns the version of the Backend API.
std::shared_ptr< arm::pipe::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we'll keep it in the backend namespace.
virtual IBackendProfilingContextPtr CreateBackendProfilingContext(const IRuntime::CreationOptions &creationOptions, IBackendProfilingPtr &backendProfiling)
Create context specifically used for profiling interaction from backends.
virtual void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry &)
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
virtual IBackendSpecificModelContextPtr CreateBackendSpecificModelContext(const ModelOptions &modelOptions) const
~IBackendInternal() override=default
Allow backends created by the factory function to be destroyed through IBackendInternal.
virtual bool UseCustomMemoryAllocator(std::shared_ptr< ICustomAllocator > allocator, armnn::Optional< std::string & > errMsg)
Signals the backend to use a custom memory allocator provided by the user.
Struct for the users to pass backend specific options.
bool operator>=(const BackendVersion &other) const
std::unique_ptr< arm::pipe::IBackendProfiling > IBackendProfilingPtr
bool SupportsTensorAllocatorAPI() const
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
virtual BackendCapabilities GetCapabilities() const
Returns a BackendCapability if the backend lists the capability The BackendCapability must then be in...
void IgnoreUnused(Ts &&...)
Copyright (c) 2021 ARM Limited and Contributors.
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
virtual std::vector< ITensorHandleFactory::FactoryId > GetHandleFactoryPreferences() const
(Optional) Returns a vector of supported TensorHandleFactory ids in preference order.
std::vector< BackendOptions > ModelOptions
bool operator==(const BackendVersion &other) const
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr
std::shared_ptr< IBackendModelContext > IBackendSpecificModelContextPtr