ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::ggml::ops::GatherLayer Class Reference

#include <GatherLayer.h>

Collaboration diagram for onert::backend::ggml::ops::GatherLayer:

Public Member Functions

 GatherLayer ()
 
void configure (const IPortableTensor *input, const IPortableTensor *indices, IPortableTensor *output, int32_t axis, ExternalContext *ctx)
 
void run () override
 
- Public Member Functions inherited from onert::exec::IFunction
virtual ~IFunction ()=default
 
virtual void prepare ()
 

Detailed Description

Definition at line 29 of file GatherLayer.h.

Constructor & Destructor Documentation

◆ GatherLayer()

onert::backend::ggml::ops::GatherLayer::GatherLayer ( )
inline

Definition at line 32 of file GatherLayer.h.

32 : _input{nullptr}, _indices{nullptr}, _output{nullptr}, _axis{-1}, _ctx{nullptr}
33 {
34 // DO NOTHING
35 }

Member Function Documentation

◆ configure()

void onert::backend::ggml::ops::GatherLayer::configure ( const IPortableTensor input,
const IPortableTensor indices,
IPortableTensor output,
int32_t  axis,
ExternalContext ctx 
)

Definition at line 67 of file GatherLayer.cc.

69{
70 _input = input;
71 _indices = indices;
72 _axis = axis;
73 _output = output;
74 _ctx = ctx;
75}

◆ run()

void onert::backend::ggml::ops::GatherLayer::run ( )
overridevirtual

Implements onert::exec::IFunction.

Definition at line 124 of file GatherLayer.cc.

125{
126 switch (_input->data_type())
127 {
128 case ir::DataType::QUANT_GGML_Q4_0:
129 runByGGMLQuantInputType();
130 break;
131 default:
132 throw std::runtime_error("Gather: unsupported input data type");
133 }
134}
ir::DataType data_type() const override final

References onert::backend::IPortableTensor::data_type().


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