ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::acl_cl::Backend Class Reference

#include <Backend.h>

Collaboration diagram for onert::backend::acl_cl::Backend:

Public Member Functions

 Backend ()
 
std::shared_ptr< IConfigconfig () const override
 
std::unique_ptr< backend::BackendContextnewContext (ContextData &&data) const override
 
std::unique_ptr< ValidatorBasevalidator (const ir::Graph &graph) const override
 
- Public Member Functions inherited from onert::backend::Backend
virtual ~Backend ()=default
 

Detailed Description

Definition at line 35 of file Backend.h.

Constructor & Destructor Documentation

◆ Backend()

onert::backend::acl_cl::Backend::Backend ( )
inline

Definition at line 38 of file Backend.h.

38: _config{std::make_shared<Config>()} {}

Member Function Documentation

◆ config()

std::shared_ptr< IConfig > onert::backend::acl_cl::Backend::config ( ) const
inlineoverridevirtual

Implements onert::backend::Backend.

Definition at line 40 of file Backend.h.

40{ return _config; }

◆ newContext()

std::unique_ptr< backend::BackendContext > onert::backend::acl_cl::Backend::newContext ( ContextData &&  data) const
inlineoverridevirtual

Implements onert::backend::Backend.

Definition at line 42 of file Backend.h.

43 {
44 const auto &graph = *data.graph;
45 const auto &operands = data.graph->operands();
46 const auto is_linear_executor = data.is_linear_executor;
47
48 auto context = std::make_unique<acl_cl::BackendContext>(this, std::move(data));
49 auto tm = createTensorManager(is_linear_executor);
50 auto tr = std::make_shared<acl_common::AclTensorRegistry<TensorManager>>(tm);
51 auto tb = std::make_shared<TensorBuilder>(operands, tm);
52 context->tensor_registry = tr;
53 context->tensor_builder = tb;
54 context->constant_initializer = std::make_shared<ConstantInitializer>(operands, tr);
55 context->kernel_gen = std::make_shared<KernelGenerator>(graph, tb, tr);
56 context->optimizer = std::make_shared<Optimizer>(context.get());
57 return context;
58 }
TensorManager * createTensorManager(bool is_linear_executor)

References onert::backend::acl_cl::createTensorManager().

◆ validator()

std::unique_ptr< ValidatorBase > onert::backend::acl_cl::Backend::validator ( const ir::Graph graph) const
inlineoverridevirtual

Reimplemented from onert::backend::Backend.

Definition at line 60 of file Backend.h.

61 {
62 return std::make_unique<Validator>(graph);
63 }

The documentation for this class was generated from the following file: