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

#include <Backend.h>

Collaboration diagram for onert::backend::cpu::Backend:

Public Member Functions

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

Detailed Description

Definition at line 36 of file Backend.h.

Constructor & Destructor Documentation

◆ Backend()

onert::backend::cpu::Backend::Backend ( )
inline

Definition at line 39 of file Backend.h.

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

Member Function Documentation

◆ config()

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

Implements onert::backend::Backend.

Definition at line 41 of file Backend.h.

41{ return _config; }

◆ newContext()

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

Implements onert::backend::Backend.

Definition at line 43 of file Backend.h.

44 {
45 auto custom_kernel_builder = data.custom_kernel_builder;
46 auto &graph = *data.graph;
47 auto context = std::make_unique<BackendContext>(this, std::move(data));
48 auto tr = std::make_shared<basic::TensorRegistry>();
49 auto tb = std::make_shared<TensorBuilder>(tr, findSharedMemoryOperandIndexes(graph));
50 context->tensor_registry = tr;
51 context->tensor_builder = tb;
52 context->kernel_gen = std::make_shared<KernelGenerator>(graph, tb, tr, custom_kernel_builder,
53 context->external_context());
54 return context;
55 }
ir::OperandIndexMap< ir::OperandIndex > findSharedMemoryOperandIndexes(const ir::IGraph &graph)

References onert::backend::cpu::findSharedMemoryOperandIndexes().


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