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

#include <RoPE.h>

Collaboration diagram for onert::ir::operation::RoPE:

Data Structures

struct  Param
 

Public Types

enum  Input { INPUT = 0 , SIN_TABLE , COS_TABLE }
 
enum  Output { OUTPUT = 0 }
 
enum class  RoPEMode { GPT_NEOX = 0 , GPT_J = 1 }
 

Public Member Functions

 RoPE (const OperandIndexSequence &inputs, const OperandIndexSequence &outputs, const Param &param)
 
void accept (OperationVisitor &v) const override
 
OpCode opcode () const final
 
const Paramparam () 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
 
const OperandIndexSequencegetOutputs () 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

Definition at line 29 of file RoPE.h.

Member Enumeration Documentation

◆ Input

Enumerator
INPUT 
SIN_TABLE 
COS_TABLE 

Definition at line 32 of file RoPE.h.

◆ Output

Enumerator
OUTPUT 

Definition at line 39 of file RoPE.h.

40 {
41 OUTPUT = 0,
42 };

◆ RoPEMode

Enumerator
GPT_NEOX 
GPT_J 

Definition at line 44 of file RoPE.h.

Constructor & Destructor Documentation

◆ RoPE()

onert::ir::operation::RoPE::RoPE ( const OperandIndexSequence inputs,
const OperandIndexSequence outputs,
const Param param 
)

Definition at line 29 of file RoPE.cc.

32{
33}
static OperandConstraint createExact(uint32_t exact)
const Param & param() const
Definition RoPE.h:63

Member Function Documentation

◆ accept()

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

Implements onert::ir::IOperation.

Definition at line 27 of file RoPE.cc.

27{ v.visit(*this); }

◆ opcode()

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

Implements onert::ir::IOperation.

Definition at line 60 of file RoPE.h.

60{ return OpCode::RoPE; }

◆ param()

const Param & onert::ir::operation::RoPE::param ( ) const
inline

Definition at line 63 of file RoPE.h.

63{ return _param; }

Referenced by onert::backend::cpu::KernelGenerator::visit().


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