24.02.1
|
Device backend interface. More...
#include <IDeviceBackend.h>
Public Member Functions | |
virtual | ~IDeviceBackend ()=default |
Virtual Destructor. More... | |
virtual void | initialize_backend ()=0 |
Initializes the backend. More... | |
virtual void | setup_backend_context (GraphContext &ctx)=0 |
Setups the given graph context. More... | |
virtual void | release_backend_context (GraphContext &ctx)=0 |
Release the backend specific resources associated to a given graph context. More... | |
virtual bool | is_backend_supported ()=0 |
Checks if an instantiated backend is actually supported. More... | |
virtual IAllocator * | backend_allocator ()=0 |
Gets a backend memory allocator. More... | |
virtual std::unique_ptr< ITensorHandle > | create_tensor (const Tensor &tensor)=0 |
Create a backend Tensor. More... | |
virtual std::unique_ptr< ITensorHandle > | create_subtensor (ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent)=0 |
Create a backend Sub-Tensor. More... | |
virtual std::unique_ptr< arm_compute::IFunction > | configure_node (INode &node, GraphContext &ctx)=0 |
Configure a backend Node. More... | |
virtual Status | validate_node (INode &node)=0 |
Validate a node. More... | |
virtual std::shared_ptr< arm_compute::IMemoryManager > | create_memory_manager (MemoryManagerAffinity affinity)=0 |
Create a backend memory manager given its affinity. More... | |
virtual std::shared_ptr< arm_compute::IWeightsManager > | create_weights_manager ()=0 |
Create a backend weights manager. More... | |
virtual void | sync ()=0 |
Synchronize kernels execution on the backend. More... | |
Device backend interface.
Definition at line 48 of file IDeviceBackend.h.
|
virtualdefault |
Virtual Destructor.
|
pure virtual |
Gets a backend memory allocator.
Implemented in CLDeviceBackend, and NEDeviceBackend.
|
pure virtual |
Configure a backend Node.
[in] | node | The node we want to configure |
[in] | ctx | Context to use |
Implemented in CLDeviceBackend, and NEDeviceBackend.
Referenced by arm_compute::graph::detail::configure_all_nodes().
|
pure virtual |
Create a backend memory manager given its affinity.
[in] | affinity | Memory Manager affinity |
Implemented in CLDeviceBackend, and NEDeviceBackend.
|
pure virtual |
Create a backend Sub-Tensor.
[in] | parent | Parent sub-tensor handle |
[in] | shape | Shape of the sub-tensor |
[in] | coords | Starting coordinates of the sub-tensor |
[in] | extend_parent | Extends parent shape if true |
Implemented in CLDeviceBackend, and NEDeviceBackend.
Referenced by DepthConcatSubTensorMutator::mutate(), and SplitLayerSubTensorMutator::mutate().
|
pure virtual |
Create a backend Tensor.
[in] | tensor | The tensor we want to create a backend tensor for |
Implemented in CLDeviceBackend, and NEDeviceBackend.
Referenced by arm_compute::graph::detail::configure_all_tensors(), and arm_compute::graph::configure_tensor().
|
pure virtual |
Create a backend weights manager.
Implemented in CLDeviceBackend, and NEDeviceBackend.
|
pure virtual |
Initializes the backend.
Implemented in CLDeviceBackend, and NEDeviceBackend.
|
pure virtual |
Checks if an instantiated backend is actually supported.
Implemented in CLDeviceBackend, and NEDeviceBackend.
Referenced by BackendRegistry::get_backend(), and arm_compute::graph::is_target_supported().
|
pure virtual |
Release the backend specific resources associated to a given graph context.
[in,out] | ctx | Graph context |
Implemented in CLDeviceBackend, and NEDeviceBackend.
|
pure virtual |
Setups the given graph context.
[in,out] | ctx | Graph context |
Implemented in CLDeviceBackend, and NEDeviceBackend.
Referenced by arm_compute::graph::setup_requested_backend_context().
|
pure virtual |
Synchronize kernels execution on the backend.
On GPU, this results in a blocking call waiting for all kernels to be completed.
Implemented in CLDeviceBackend, and NEDeviceBackend.
Validate a node.
[in] | node | The node we want to validate |
Implemented in CLDeviceBackend, and NEDeviceBackend.
Referenced by GroupedConvolutionMutator::mutate(), and arm_compute::graph::detail::validate_all_nodes().