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

#include <TileLayer.h>

Collaboration diagram for onert::backend::cpu::ops::TileLayer:

Public Member Functions

 TileLayer ()
 
void tileFloat32 ()
 
void tileQuant8 ()
 
void configure (const IPortableTensor *input, const IPortableTensor *_multipliers, IPortableTensor *output)
 
void run () override
 
- Public Member Functions inherited from onert::exec::IFunction
virtual ~IFunction ()=default
 
virtual void prepare ()
 

Detailed Description

Definition at line 33 of file TileLayer.h.

Constructor & Destructor Documentation

◆ TileLayer()

onert::backend::cpu::ops::TileLayer::TileLayer ( )

Definition at line 32 of file TileLayer.cc.

32 : _input(nullptr), _multipliers(nullptr), _output(nullptr)
33{
34 // DO NOTHING
35}

Member Function Documentation

◆ configure()

void onert::backend::cpu::ops::TileLayer::configure ( const IPortableTensor input,
const IPortableTensor _multipliers,
IPortableTensor output 
)

Definition at line 49 of file TileLayer.cc.

51{
52 _input = input;
53 _multipliers = multipliers;
54 _output = output;
55}

◆ run()

void onert::backend::cpu::ops::TileLayer::run ( )
overridevirtual

Implements onert::exec::IFunction.

Definition at line 57 of file TileLayer.cc.

58{
59 if (_input->data_type() == OperandType::FLOAT32)
60 {
62 }
63 else if (_input->data_type() == OperandType::QUANT_UINT8_ASYMM)
64 {
65 tileQuant8();
66 }
67 else
68 {
69 throw std::runtime_error{"Tile: unsupported data type"};
70 }
71}
ir::DataType data_type() const override final

References onert::backend::IPortableTensor::data_type(), tileFloat32(), and tileQuant8().

Referenced by package.infer.session::inference().

◆ tileFloat32()

void onert::backend::cpu::ops::TileLayer::tileFloat32 ( )

Definition at line 37 of file TileLayer.cc.

38{
39 TileOneDimension(getShape(_input), getBuffer<float>(_input), getBuffer<int>(_multipliers),
40 getBuffer<float>(_output), 0);
41}
std::pair< int, int > TileOneDimension(const Shape &in_dimensions, const T *in_data, const M *multipliers, T *out_data, int dimension)
Definition Tile.h:41
nnfw::cker::Shape getShape(const IPortableTensor *tensor)

References onert::backend::cpu::ops::getShape().

Referenced by run().

◆ tileQuant8()

void onert::backend::cpu::ops::TileLayer::tileQuant8 ( )

Definition at line 43 of file TileLayer.cc.

44{
45 // cker quant8 tile is not implemented yet
46 throw std::runtime_error{"NYI"};
47}

Referenced by run().


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