21.02
|
Neon device backend. More...
#include <NEDeviceBackend.h>
Public Member Functions | |
NEDeviceBackend () | |
void | initialize_backend () override |
Initializes the backend. More... | |
void | setup_backend_context (GraphContext &ctx) override |
Setups the given graph context. More... | |
void | release_backend_context (GraphContext &ctx) override |
Release the backend specific resources associated to a given graph context. More... | |
bool | is_backend_supported () override |
Checks if an instantiated backend is actually supported. More... | |
IAllocator * | backend_allocator () override |
Gets a backend memory allocator. More... | |
std::unique_ptr< ITensorHandle > | create_tensor (const Tensor &tensor) override |
Create a backend Tensor. More... | |
std::unique_ptr< ITensorHandle > | create_subtensor (ITensorHandle *parent, TensorShape shape, Coordinates coords, bool extend_parent) override |
Create a backend Sub-Tensor. More... | |
std::unique_ptr< arm_compute::IFunction > | configure_node (INode &node, GraphContext &ctx) override |
Configure a backend Node. More... | |
Status | validate_node (INode &node) override |
Validate a node. More... | |
std::shared_ptr< arm_compute::IMemoryManager > | create_memory_manager (MemoryManagerAffinity affinity) override |
Create a backend memory manager given its affinity. More... | |
std::shared_ptr< arm_compute::IWeightsManager > | create_weights_manager () override |
Create a backend weights manager. More... | |
![]() | |
virtual | ~IDeviceBackend ()=default |
Virtual Destructor. More... | |
Neon device backend.
Definition at line 38 of file NEDeviceBackend.h.
NEDeviceBackend | ( | ) |
Definition at line 58 of file NEDeviceBackend.cpp.
|
overridevirtual |
Gets a backend memory allocator.
Implements IDeviceBackend.
Definition at line 111 of file NEDeviceBackend.cpp.
|
overridevirtual |
Configure a backend Node.
[in] | node | The node we want to configure |
[in] | ctx | Context to use |
Implements IDeviceBackend.
Definition at line 139 of file NEDeviceBackend.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, INode::assigned_target(), NEFunctionFactory::create(), INode::id(), and arm_compute::graph::NEON.
|
overridevirtual |
Create a backend memory manager given its affinity.
[in] | affinity | Memory Manager affinity |
Implements IDeviceBackend.
Definition at line 156 of file NEDeviceBackend.cpp.
References arm_compute::graph::Buffer.
Referenced by NEDeviceBackend::setup_backend_context().
|
overridevirtual |
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 |
Implements IDeviceBackend.
Definition at line 129 of file NEDeviceBackend.cpp.
References arm_compute::test::validation::shape.
|
overridevirtual |
Create a backend Tensor.
[in] | tensor | The tensor we want to create a backend tensor for |
Implements IDeviceBackend.
Definition at line 116 of file NEDeviceBackend.cpp.
References ARM_COMPUTE_ERROR_ON, TensorDescriptor::data_type, Tensor::desc(), arm_compute::test::validation::info, TensorDescriptor::layout, arm_compute::graph::NEON, TensorDescriptor::quant_info, TensorInfo::set_data_layout(), TensorDescriptor::shape, and TensorDescriptor::target.
|
overridevirtual |
Create a backend weights manager.
Implements IDeviceBackend.
Definition at line 173 of file NEDeviceBackend.cpp.
Referenced by NEDeviceBackend::setup_backend_context().
|
overridevirtual |
Initializes the backend.
Implements IDeviceBackend.
Definition at line 63 of file NEDeviceBackend.cpp.
|
overridevirtual |
Checks if an instantiated backend is actually supported.
Implements IDeviceBackend.
Definition at line 106 of file NEDeviceBackend.cpp.
|
overridevirtual |
Release the backend specific resources associated to a given graph context.
[in,out] | ctx | Graph context |
Implements IDeviceBackend.
Definition at line 68 of file NEDeviceBackend.cpp.
References ARM_COMPUTE_UNUSED.
|
overridevirtual |
Setups the given graph context.
[in,out] | ctx | Graph context |
Implements IDeviceBackend.
Definition at line 74 of file NEDeviceBackend.cpp.
References MemoryManagerContext::allocator, GraphContext::config(), NEDeviceBackend::create_memory_manager(), NEDeviceBackend::create_weights_manager(), MemoryManagerContext::cross_group, MemoryManagerContext::cross_mm, Scheduler::get(), GraphContext::insert_memory_management_ctx(), GraphContext::insert_weights_management_ctx(), MemoryManagerContext::intra_mm, GraphContext::memory_management_ctx(), arm_compute::graph::NEON, GraphConfig::num_threads, arm_compute::graph::Offset, IScheduler::set_num_threads(), MemoryManagerContext::target, WeightsManagerContext::target, GraphContext::weights_management_ctx(), and WeightsManagerContext::wm.
|
overridevirtual |
Validate a node.
[in] | node | The node we want to validate |
Implements IDeviceBackend.
Definition at line 148 of file NEDeviceBackend.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_LOG_GRAPH_VERBOSE, INode::assigned_target(), INode::id(), arm_compute::graph::NEON, and NENodeValidator::validate().