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 <<
"]";
147 bool SupportsTensorAllocatorAPI()
const;
152 virtual std::vector<ITensorHandleFactory::FactoryId> GetHandleFactoryPreferences()
const;
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.");
virtual void RegisterTensorHandleFactories(class TensorHandleFactoryRegistry &)
(Optional) Register TensorHandleFactories Either this method or CreateMemoryManager() and IWorkloadFa...
bool operator>=(const BackendVersion &other) const
std::unique_ptr< IWorkloadFactory > IWorkloadFactoryPtr
bool operator<=(const BackendVersion &other) const
constexpr BackendVersion(uint32_t major, uint32_t minor)
std::vector< BackendOptions > ModelOptions
virtual std::unique_ptr< ICustomAllocator > GetDefaultAllocator() const
Returns the default memory allocator for the backend.
Each backend should implement an IBackend.
std::ostream & operator<<(std::ostream &os, const std::vector< Compute > &compute)
Deprecated function that will be removed together with the Compute enum.
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.
unsigned int MemorySourceFlags
Copyright (c) 2021 ARM Limited and Contributors.
std::unique_ptr< IMemoryManager > IMemoryManagerUniquePtr
void IgnoreUnused(Ts &&...)
The SubgraphView class represents a subgraph of a Graph.
static constexpr BackendVersion GetApiVersion()
Returns the version of the Backend API.
virtual unsigned int GetNumberOfCacheFiles() const
Returns the number of files cached if backend supports caching.
std::shared_ptr< IBackendModelContext > IBackendSpecificModelContextPtr
std::shared_ptr< IMemoryManager > IMemoryManagerSharedPtr
BackendOptions BackendCapabilities
std::shared_ptr< arm::pipe::IBackendProfilingContext > IBackendProfilingContextPtr
This is the bridge between backend and backend profiling we'll keep it in the backend namespace...
bool operator==(const BackendVersion &other) const
std::shared_ptr< ILayerSupport > ILayerSupportSharedPtr
Struct for the users to pass backend specific options.
std::unique_ptr< arm::pipe::IBackendProfiling > IBackendProfilingPtr
virtual BackendCapabilities GetCapabilities() const
Returns a BackendCapability if the backend lists the capability The BackendCapability must then be in...
Base class for all ArmNN exceptions so that users can filter to just those.
std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr
constexpr BackendVersion()
virtual void UpdateExecutionData(ExecutionData &executionData, WorkingMemDescriptor &workingMemDescriptor) const
Update the ExecutionData for a layer.
virtual ExecutionData CreateExecutionData(WorkingMemDescriptor &workingMemDescriptor) const
Returns ExecutionData for the backend.
std::unique_ptr< IBackendContext > IBackendContextPtr