ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::ir::operation::Permute Class Reference

Class to represent Permute operation. More...

#include <Permute.h>

Collaboration diagram for onert::ir::operation::Permute:

Public Member Functions

void accept (OperationVisitor &v) const override
 
OpCode opcode () const final
 
 Permute (const OperandIndex &input, const OperandIndex &output, PermuteType type)
 
PermuteType getPermuteType () const
 
- Public Member Functions inherited from onert::ir::Operation
 Operation (OperandConstraint input_constr, const OperandIndexSequence &inputs, const OperandIndexSequence &outputs, OperandConstraint output_constr=OperandConstraint::createAny())
 
 Operation (OperandConstraint input_constr, OperandConstraint output_constr=OperandConstraint::createAny())
 
 Operation (const Operation &)=default
 
 Operation (Operation &&)=default
 
Operationoperator= (const Operation &)=default
 
Operationoperator= (Operation &&)=default
 
virtual ~Operation ()
 
void replaceInputs (const OperandIndex &from, const OperandIndex &to) override
 
void replaceOutputs (const OperandIndex &from, const OperandIndex &to) override
 
OperandIndexSequencegetInputs ()
 
const OperandIndexSequencegetInputs () const override
 
OperandIndexSequence getUsedInputSet () const override
 
const OperandIndexSequencegetOutputs () const override
 
OperandIndexSequence getUsedOutputSet () const override
 
void setInputs (const OperandIndexSequence &indexes)
 
void setOutputs (const OperandIndexSequence &indexes)
 
- Public Member Functions inherited from onert::ir::IOperation
virtual ~IOperation ()=default
 
virtual std::string name () const
 

Detailed Description

Class to represent Permute operation.

Note
Permute operation reorders the dimensions of a tensor and convert data types if needed
   This operation is virtual operation, which is not used on real model, but used internally.
   This operation is used for below cases.

   But currently, model layout and backend layout are always same as NHWC.
   So this operation is used for below cases.
   1) Handle model output buffer's special case
     1-1) Model output is comes from model constant
     1-2) Model output is comes from model input
     1-3) Model output shares tensor with other model output(s)
   2) Handle when tensor defining backend is different with tensor using backend
   3) Handle when actual input and/or output layouts are different with model layout
      by user setting
   4) Handle when actual input and/or output data type is different with model data type
      by user setting or model connection

Definition at line 49 of file Permute.h.

Constructor & Destructor Documentation

◆ Permute()

onert::ir::operation::Permute::Permute ( const OperandIndex input,
const OperandIndex output,
ir::PermuteType  type 
)

Definition at line 25 of file Permute.cc.

27{
30}
static OperandConstraint createExact(uint32_t exact)
void setInputs(const OperandIndexSequence &indexes)
Definition Operation.cc:39
void setOutputs(const OperandIndexSequence &indexes)
Definition Operation.cc:46
type
Definition infer.py:18

References onert::ir::Operation::setInputs(), and onert::ir::Operation::setOutputs().

Member Function Documentation

◆ accept()

void onert::ir::operation::Permute::accept ( OperationVisitor v) const
overridevirtual

Implements onert::ir::IOperation.

Reimplemented in onert::ir::train::operation::Permute.

Definition at line 23 of file Permute.cc.

23{ v.visit(*this); }

◆ getPermuteType()

PermuteType onert::ir::operation::Permute::getPermuteType ( ) const
inline

Definition at line 59 of file Permute.h.

59{ return _type; }

Referenced by onert::exec::DynamicShapeInferer::visit(), and onert::ir::OperationDumper::visit().

◆ opcode()

OpCode onert::ir::operation::Permute::opcode ( ) const
inlinefinalvirtual

Implements onert::ir::IOperation.

Definition at line 53 of file Permute.h.

53{ return OpCode::Permute; }

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