ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::xnnpack::ops::Layer Class Referenceabstract

#include <Layer.h>

Collaboration diagram for onert::backend::xnnpack::ops::Layer:

Public Member Functions

 Layer (const std::shared_ptr< ExternalContext > external_context)
 
 ~Layer ()
 
void prepare () override
 
virtual bool create ()=0
 
virtual bool setup ()=0
 
- Public Member Functions inherited from onert::exec::IFunction
virtual ~IFunction ()=default
 
virtual void run ()=0
 

Protected Attributes

xnn_operator_t _kernel_op
 
bool _create
 
bool _setup
 
const std::shared_ptr< ExternalContext_external_context
 

Detailed Description

Definition at line 40 of file Layer.h.

Constructor & Destructor Documentation

◆ Layer()

onert::backend::xnnpack::ops::Layer::Layer ( const std::shared_ptr< ExternalContext external_context)
inline

Definition at line 43 of file Layer.h.

44 : _kernel_op{nullptr}, _create{false}, _setup{false}, _external_context{external_context}
45 {
46 // DO NOTHING
47 }
const std::shared_ptr< ExternalContext > _external_context
Definition Layer.h:73

◆ ~Layer()

onert::backend::xnnpack::ops::Layer::~Layer ( )
inline

Definition at line 49 of file Layer.h.

50 {
51 if (_kernel_op)
52 xnn_delete_operator(_kernel_op);
53 }

References _kernel_op.

Member Function Documentation

◆ create()

virtual bool onert::backend::xnnpack::ops::Layer::create ( )
pure virtual

◆ prepare()

void onert::backend::xnnpack::ops::Layer::prepare ( )
inlineoverridevirtual

Reimplemented from onert::exec::IFunction.

Definition at line 56 of file Layer.h.

57 {
58 if (_create)
59 return;
60
61 _create = create();
62 assert(_create);
63
64 _setup = setup();
65 }

References _create, _setup, create(), and setup().

◆ setup()

virtual bool onert::backend::xnnpack::ops::Layer::setup ( )
pure virtual

Field Documentation

◆ _create

bool onert::backend::xnnpack::ops::Layer::_create
protected

Definition at line 71 of file Layer.h.

Referenced by prepare().

◆ _external_context

◆ _kernel_op

◆ _setup


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