TT-MLIR
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
mlir::tt::ttnn::AllReduceOp Class Reference
Inheritance diagram for mlir::tt::ttnn::AllReduceOp:

Public Types

using Adaptor = AllReduceOpAdaptor
 
template<typename RangeT >
using GenericAdaptor = AllReduceOpGenericAdaptor< RangeT >
 
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > >
 
using Properties = FoldAdaptor::Properties
 

Public Member Functions

static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames ()
 
::mlir::StringAttr getMathOpAttrName ()
 
::mlir::StringAttr getNumLinksAttrName ()
 
::mlir::StringAttr getScatterDimAttrName ()
 
::mlir::StringAttr getScatterNumAttrName ()
 
std::pair< unsigned, unsigned > getODSOperandIndexAndLength (unsigned index)
 
::mlir::Operation::operand_range getODSOperands (unsigned index)
 
::mlir::TypedValue<::mlir::RankedTensorType > getInput ()
 
::mlir::TypedValue<::mlir::tt::DeviceTypegetDevice ()
 
::mlir::OpOperand & getInputMutable ()
 
::mlir::OpOperand & getDeviceMutable ()
 
std::pair< unsigned, unsigned > getODSResultIndexAndLength (unsigned index)
 
::mlir::Operation::result_range getODSResults (unsigned index)
 
::mlir::TypedValue<::mlir::RankedTensorType > getResult ()
 
void writeProperties (::mlir::DialectBytecodeWriter &writer)
 
::mlir::IntegerAttr getScatterDimAttr ()
 
int32_t getScatterDim ()
 
::mlir::IntegerAttr getScatterNumAttr ()
 
int32_t getScatterNum ()
 
::mlir::tt::ReduceTypeAttr getMathOpAttr ()
 
::mlir::tt::ReduceType getMathOp ()
 
::mlir::IntegerAttr getNumLinksAttr ()
 
int32_t getNumLinks ()
 
void setScatterDimAttr (::mlir::IntegerAttr attr)
 
void setScatterDim (int32_t attrValue)
 
void setScatterNumAttr (::mlir::IntegerAttr attr)
 
void setScatterNum (int32_t attrValue)
 
void setMathOpAttr (::mlir::tt::ReduceTypeAttr attr)
 
void setMathOp (::mlir::tt::ReduceType attrValue)
 
void setNumLinksAttr (::mlir::IntegerAttr attr)
 
void setNumLinks (int32_t attrValue)
 
::llvm::LogicalResult verifyInvariantsImpl ()
 
::llvm::LogicalResult verifyInvariants ()
 
::llvm::LogicalResult verify ()
 
void getEffects (::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect >> &effects)
 

Static Public Member Functions

::mlir::StringAttr getMathOpAttrName (::mlir::OperationName name)
 
::mlir::StringAttr getNumLinksAttrName (::mlir::OperationName name)
 
::mlir::StringAttr getScatterDimAttrName (::mlir::OperationName name)
 
::mlir::StringAttr getScatterNumAttrName (::mlir::OperationName name)
 
static constexpr ::llvm::StringLiteral getOperationName ()
 
::llvm::LogicalResult setPropertiesFromAttr (Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
 
::mlir::Attribute getPropertiesAsAttr (::mlir::MLIRContext *ctx, const Properties &prop)
 
static llvm::hash_code computePropertiesHash (const Properties &prop)
 
static std::optional< mlir::Attribute > getInherentAttr (::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
 
static void setInherentAttr (Properties &prop, llvm::StringRef name, mlir::Attribute value)
 
static void populateInherentAttrs (::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
 
::llvm::LogicalResult verifyInherentAttrs (::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
 
::llvm::LogicalResult readProperties (::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
 
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, ::mlir::Value device, ::mlir::IntegerAttr scatter_dim, ::mlir::IntegerAttr scatter_num, ::mlir::tt::ReduceTypeAttr math_op, ::mlir::IntegerAttr num_links)
 
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, ::mlir::Value device, ::mlir::IntegerAttr scatter_dim, ::mlir::IntegerAttr scatter_num, ::mlir::tt::ReduceTypeAttr math_op, ::mlir::IntegerAttr num_links)
 
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, ::mlir::Value device, int32_t scatter_dim, int32_t scatter_num, ::mlir::tt::ReduceType math_op, int32_t num_links=1)
 
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, ::mlir::Value device, int32_t scatter_dim, int32_t scatter_num, ::mlir::tt::ReduceType math_op, int32_t num_links=1)
 
static void build (::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes={})
 
static void populateDefaultProperties (::mlir::OperationName opName, Properties &properties)
 

Private Member Functions

::mlir::StringAttr getAttributeNameForIndex (unsigned index)
 

Static Private Member Functions

::mlir::StringAttr getAttributeNameForIndex (::mlir::OperationName name, unsigned index)
 

Member Typedef Documentation

◆ Adaptor

◆ FoldAdaptor

using mlir::tt::ttnn::AllReduceOp::FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute> >

◆ GenericAdaptor

template<typename RangeT >
using mlir::tt::ttnn::AllReduceOp::GenericAdaptor = AllReduceOpGenericAdaptor<RangeT>

◆ Properties

Member Function Documentation

◆ build() [1/5]

void mlir::tt::ttnn::AllReduceOp::build ( ::mlir::OpBuilder &  ,
::mlir::OperationState &  odsState,
::mlir::TypeRange  resultTypes,
::mlir::ValueRange  operands,
::llvm::ArrayRef<::mlir::NamedAttribute >  attributes = {} 
)
static

◆ build() [2/5]

void mlir::tt::ttnn::AllReduceOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::Type  result,
::mlir::Value  input,
::mlir::Value  device,
::mlir::IntegerAttr  scatter_dim,
::mlir::IntegerAttr  scatter_num,
::mlir::tt::ReduceTypeAttr  math_op,
::mlir::IntegerAttr  num_links 
)
static

◆ build() [3/5]

void mlir::tt::ttnn::AllReduceOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::Type  result,
::mlir::Value  input,
::mlir::Value  device,
int32_t  scatter_dim,
int32_t  scatter_num,
::mlir::tt::ReduceType  math_op,
int32_t  num_links = 1 
)
static

◆ build() [4/5]

void mlir::tt::ttnn::AllReduceOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::TypeRange  resultTypes,
::mlir::Value  input,
::mlir::Value  device,
::mlir::IntegerAttr  scatter_dim,
::mlir::IntegerAttr  scatter_num,
::mlir::tt::ReduceTypeAttr  math_op,
::mlir::IntegerAttr  num_links 
)
static

◆ build() [5/5]

void mlir::tt::ttnn::AllReduceOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::TypeRange  resultTypes,
::mlir::Value  input,
::mlir::Value  device,
int32_t  scatter_dim,
int32_t  scatter_num,
::mlir::tt::ReduceType  math_op,
int32_t  num_links = 1 
)
static

◆ computePropertiesHash()

llvm::hash_code mlir::tt::ttnn::AllReduceOp::computePropertiesHash ( const Properties prop)
static

◆ getAttributeNameForIndex() [1/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getAttributeNameForIndex ( ::mlir::OperationName  name,
unsigned  index 
)
inlinestaticprivate

◆ getAttributeNameForIndex() [2/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getAttributeNameForIndex ( unsigned  index)
inlineprivate

◆ getAttributeNames()

static ::llvm::ArrayRef<::llvm::StringRef> mlir::tt::ttnn::AllReduceOp::getAttributeNames ( )
inline

◆ getDevice()

::mlir::TypedValue<::mlir::tt::DeviceType> mlir::tt::ttnn::AllReduceOp::getDevice ( )
inline

◆ getDeviceMutable()

::mlir::OpOperand& mlir::tt::ttnn::AllReduceOp::getDeviceMutable ( )
inline

◆ getEffects()

void mlir::tt::ttnn::AllReduceOp::getEffects ( ::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect >> &  effects)

◆ getInherentAttr()

std::optional< mlir::Attribute > mlir::tt::ttnn::AllReduceOp::getInherentAttr ( ::mlir::MLIRContext *  ctx,
const Properties prop,
llvm::StringRef  name 
)
static

◆ getInput()

::mlir::TypedValue<::mlir::RankedTensorType> mlir::tt::ttnn::AllReduceOp::getInput ( )
inline

◆ getInputMutable()

::mlir::OpOperand& mlir::tt::ttnn::AllReduceOp::getInputMutable ( )
inline

◆ getMathOp()

mlir::tt::ReduceType mlir::tt::ttnn::AllReduceOp::getMathOp ( )

◆ getMathOpAttr()

::mlir::tt::ReduceTypeAttr mlir::tt::ttnn::AllReduceOp::getMathOpAttr ( )
inline

◆ getMathOpAttrName() [1/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getMathOpAttrName ( )
inline

◆ getMathOpAttrName() [2/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getMathOpAttrName ( ::mlir::OperationName  name)
inlinestatic

◆ getNumLinks()

int32_t mlir::tt::ttnn::AllReduceOp::getNumLinks ( )

◆ getNumLinksAttr()

::mlir::IntegerAttr mlir::tt::ttnn::AllReduceOp::getNumLinksAttr ( )
inline

◆ getNumLinksAttrName() [1/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getNumLinksAttrName ( )
inline

◆ getNumLinksAttrName() [2/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getNumLinksAttrName ( ::mlir::OperationName  name)
inlinestatic

◆ getODSOperandIndexAndLength()

std::pair<unsigned, unsigned> mlir::tt::ttnn::AllReduceOp::getODSOperandIndexAndLength ( unsigned  index)
inline

◆ getODSOperands()

::mlir::Operation::operand_range mlir::tt::ttnn::AllReduceOp::getODSOperands ( unsigned  index)
inline

◆ getODSResultIndexAndLength()

std::pair<unsigned, unsigned> mlir::tt::ttnn::AllReduceOp::getODSResultIndexAndLength ( unsigned  index)
inline

◆ getODSResults()

::mlir::Operation::result_range mlir::tt::ttnn::AllReduceOp::getODSResults ( unsigned  index)
inline

◆ getOperationName()

static constexpr ::llvm::StringLiteral mlir::tt::ttnn::AllReduceOp::getOperationName ( )
inlinestatic

◆ getPropertiesAsAttr()

mlir::Attribute mlir::tt::ttnn::AllReduceOp::getPropertiesAsAttr ( ::mlir::MLIRContext *  ctx,
const Properties prop 
)
static

◆ getResult()

::mlir::TypedValue<::mlir::RankedTensorType> mlir::tt::ttnn::AllReduceOp::getResult ( )
inline

◆ getScatterDim()

int32_t mlir::tt::ttnn::AllReduceOp::getScatterDim ( )

◆ getScatterDimAttr()

::mlir::IntegerAttr mlir::tt::ttnn::AllReduceOp::getScatterDimAttr ( )
inline

◆ getScatterDimAttrName() [1/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getScatterDimAttrName ( )
inline

◆ getScatterDimAttrName() [2/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getScatterDimAttrName ( ::mlir::OperationName  name)
inlinestatic

◆ getScatterNum()

int32_t mlir::tt::ttnn::AllReduceOp::getScatterNum ( )

◆ getScatterNumAttr()

::mlir::IntegerAttr mlir::tt::ttnn::AllReduceOp::getScatterNumAttr ( )
inline

◆ getScatterNumAttrName() [1/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getScatterNumAttrName ( )
inline

◆ getScatterNumAttrName() [2/2]

::mlir::StringAttr mlir::tt::ttnn::AllReduceOp::getScatterNumAttrName ( ::mlir::OperationName  name)
inlinestatic

◆ populateDefaultProperties()

void mlir::tt::ttnn::AllReduceOp::populateDefaultProperties ( ::mlir::OperationName  opName,
Properties properties 
)
static

◆ populateInherentAttrs()

void mlir::tt::ttnn::AllReduceOp::populateInherentAttrs ( ::mlir::MLIRContext *  ctx,
const Properties prop,
::mlir::NamedAttrList &  attrs 
)
static

◆ readProperties()

llvm::LogicalResult mlir::tt::ttnn::AllReduceOp::readProperties ( ::mlir::DialectBytecodeReader &  reader,
::mlir::OperationState &  state 
)
static

◆ setInherentAttr()

void mlir::tt::ttnn::AllReduceOp::setInherentAttr ( Properties prop,
llvm::StringRef  name,
mlir::Attribute  value 
)
static

◆ setMathOp()

void mlir::tt::ttnn::AllReduceOp::setMathOp ( ::mlir::tt::ReduceType  attrValue)

◆ setMathOpAttr()

void mlir::tt::ttnn::AllReduceOp::setMathOpAttr ( ::mlir::tt::ReduceTypeAttr  attr)
inline

◆ setNumLinks()

void mlir::tt::ttnn::AllReduceOp::setNumLinks ( int32_t  attrValue)

◆ setNumLinksAttr()

void mlir::tt::ttnn::AllReduceOp::setNumLinksAttr ( ::mlir::IntegerAttr  attr)
inline

◆ setPropertiesFromAttr()

llvm::LogicalResult mlir::tt::ttnn::AllReduceOp::setPropertiesFromAttr ( Properties prop,
::mlir::Attribute  attr,
::llvm::function_ref<::mlir::InFlightDiagnostic()>  emitError 
)
static

◆ setScatterDim()

void mlir::tt::ttnn::AllReduceOp::setScatterDim ( int32_t  attrValue)

◆ setScatterDimAttr()

void mlir::tt::ttnn::AllReduceOp::setScatterDimAttr ( ::mlir::IntegerAttr  attr)
inline

◆ setScatterNum()

void mlir::tt::ttnn::AllReduceOp::setScatterNum ( int32_t  attrValue)

◆ setScatterNumAttr()

void mlir::tt::ttnn::AllReduceOp::setScatterNumAttr ( ::mlir::IntegerAttr  attr)
inline

◆ verify()

::llvm::LogicalResult mlir::tt::ttnn::AllReduceOp::verify ( )

◆ verifyInherentAttrs()

llvm::LogicalResult mlir::tt::ttnn::AllReduceOp::verifyInherentAttrs ( ::mlir::OperationName  opName,
::mlir::NamedAttrList &  attrs,
llvm::function_ref<::mlir::InFlightDiagnostic()>  emitError 
)
static

◆ verifyInvariants()

llvm::LogicalResult mlir::tt::ttnn::AllReduceOp::verifyInvariants ( )

◆ verifyInvariantsImpl()

llvm::LogicalResult mlir::tt::ttnn::AllReduceOp::verifyInvariantsImpl ( )

◆ writeProperties()

void mlir::tt::ttnn::AllReduceOp::writeProperties ( ::mlir::DialectBytecodeWriter &  writer)

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