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

#include <DepthToSpaceLayer.h>

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

Public Member Functions

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

Detailed Description

Definition at line 32 of file DepthToSpaceLayer.h.

Constructor & Destructor Documentation

◆ DepthToSpaceLayer()

onert::backend::cpu::ops::DepthToSpaceLayer::DepthToSpaceLayer ( )

Definition at line 31 of file DepthToSpaceLayer.cc.

31 : _input(nullptr), _block_size(0), _output(nullptr)
32{
33 // DO NOTHING
34}

Member Function Documentation

◆ configure()

void onert::backend::cpu::ops::DepthToSpaceLayer::configure ( const IPortableTensor input,
const int32_t  block_size,
IPortableTensor output 
)

Definition at line 42 of file DepthToSpaceLayer.cc.

44{
45 _input = input;
46 _block_size = block_size;
47 _output = output;
48}

◆ run()

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

Implements onert::exec::IFunction.

Definition at line 50 of file DepthToSpaceLayer.cc.

51{
52 switch (_input->data_type())
53 {
54 case OperandType::FLOAT32:
55 depthToSpace<float>();
56 break;
57 case OperandType::INT32:
58 depthToSpace<int32_t>();
59 break;
60 case OperandType::INT64:
61 depthToSpace<int64_t>();
62 break;
63 case OperandType::QUANT_UINT8_ASYMM:
64 depthToSpace<uint8_t>();
65 break;
66 case OperandType::QUANT_INT8_ASYMM:
67 depthToSpace<int8_t>();
68 break;
69 default:
70 throw std::runtime_error{"DepthToSpace: unsupported data type"};
71 }
72}
ir::DataType data_type() const override final

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

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


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