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::ToLayoutOp Class Reference
Inheritance diagram for mlir::tt::ttnn::ToLayoutOp:

Public Types

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

Public Member Functions

static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames ()
 
::mlir::StringAttr getDtypeAttrName ()
 
::mlir::StringAttr getLayoutAttrName ()
 
::mlir::StringAttr getMemoryConfigAttrName ()
 
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::MutableOperandRange 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::tt::ttnn::LayoutAttr getLayoutAttr ()
 
::mlir::tt::ttnn::Layout getLayout ()
 
::mlir::tt::DataTypeAttr getDtypeAttr ()
 
::std::optional<::mlir::tt::DataTypegetDtype ()
 
::mlir::tt::ttnn::MemoryConfigAttr getMemoryConfigAttr ()
 
::std::optional<::mlir::tt::ttnn::MemoryConfigAttrgetMemoryConfig ()
 
void setLayoutAttr (::mlir::tt::ttnn::LayoutAttr attr)
 
void setLayout (::mlir::tt::ttnn::Layout attrValue)
 
void setDtypeAttr (::mlir::tt::DataTypeAttr attr)
 
void setDtype (::std::optional<::mlir::tt::DataType > attrValue)
 
void setMemoryConfigAttr (::mlir::tt::ttnn::MemoryConfigAttr attr)
 
::mlir::Attribute removeDtypeAttr ()
 
::mlir::Attribute removeMemoryConfigAttr ()
 
::llvm::LogicalResult verifyInvariantsImpl ()
 
::llvm::LogicalResult verifyInvariants ()
 

Static Public Member Functions

::mlir::StringAttr getDtypeAttrName (::mlir::OperationName name)
 
::mlir::StringAttr getLayoutAttrName (::mlir::OperationName name)
 
::mlir::StringAttr getMemoryConfigAttrName (::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::tt::ttnn::LayoutAttr layout, ::mlir::tt::DataTypeAttr dtype, ::mlir::tt::ttnn::MemoryConfigAttr memory_config, ::mlir::Value device)
 
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, ::mlir::tt::ttnn::LayoutAttr layout, ::mlir::tt::DataTypeAttr dtype, ::mlir::tt::ttnn::MemoryConfigAttr memory_config, ::mlir::Value device)
 
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input, ::mlir::tt::ttnn::Layout layout, ::mlir::tt::DataTypeAttr dtype, ::mlir::tt::ttnn::MemoryConfigAttr memory_config, ::mlir::Value device)
 
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input, ::mlir::tt::ttnn::Layout layout, ::mlir::tt::DataTypeAttr dtype, ::mlir::tt::ttnn::MemoryConfigAttr memory_config, ::mlir::Value device)
 
static void build (::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes={})
 

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::ToLayoutOp::FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute> >

◆ GenericAdaptor

template<typename RangeT >
using mlir::tt::ttnn::ToLayoutOp::GenericAdaptor = ToLayoutOpGenericAdaptor<RangeT>

◆ Properties

Member Function Documentation

◆ build() [1/5]

void mlir::tt::ttnn::ToLayoutOp::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::ToLayoutOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::Type  result,
::mlir::Value  input,
::mlir::tt::ttnn::Layout  layout,
::mlir::tt::DataTypeAttr  dtype,
::mlir::tt::ttnn::MemoryConfigAttr  memory_config,
::mlir::Value  device 
)
static

◆ build() [3/5]

void mlir::tt::ttnn::ToLayoutOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::Type  result,
::mlir::Value  input,
::mlir::tt::ttnn::LayoutAttr  layout,
::mlir::tt::DataTypeAttr  dtype,
::mlir::tt::ttnn::MemoryConfigAttr  memory_config,
::mlir::Value  device 
)
static

◆ build() [4/5]

void mlir::tt::ttnn::ToLayoutOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::TypeRange  resultTypes,
::mlir::Value  input,
::mlir::tt::ttnn::Layout  layout,
::mlir::tt::DataTypeAttr  dtype,
::mlir::tt::ttnn::MemoryConfigAttr  memory_config,
::mlir::Value  device 
)
static

◆ build() [5/5]

void mlir::tt::ttnn::ToLayoutOp::build ( ::mlir::OpBuilder &  odsBuilder,
::mlir::OperationState &  odsState,
::mlir::TypeRange  resultTypes,
::mlir::Value  input,
::mlir::tt::ttnn::LayoutAttr  layout,
::mlir::tt::DataTypeAttr  dtype,
::mlir::tt::ttnn::MemoryConfigAttr  memory_config,
::mlir::Value  device 
)
static

◆ computePropertiesHash()

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

◆ getAttributeNameForIndex() [1/2]

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

◆ getAttributeNameForIndex() [2/2]

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

◆ getAttributeNames()

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

◆ getDevice()

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

◆ getDeviceMutable()

mlir::MutableOperandRange mlir::tt::ttnn::ToLayoutOp::getDeviceMutable ( )

◆ getDtype()

std::optional<::mlir::tt::DataType > mlir::tt::ttnn::ToLayoutOp::getDtype ( )

◆ getDtypeAttr()

::mlir::tt::DataTypeAttr mlir::tt::ttnn::ToLayoutOp::getDtypeAttr ( )
inline

◆ getDtypeAttrName() [1/2]

::mlir::StringAttr mlir::tt::ttnn::ToLayoutOp::getDtypeAttrName ( )
inline

◆ getDtypeAttrName() [2/2]

::mlir::StringAttr mlir::tt::ttnn::ToLayoutOp::getDtypeAttrName ( ::mlir::OperationName  name)
inlinestatic

◆ getInherentAttr()

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

◆ getInput()

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

◆ getInputMutable()

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

◆ getLayout()

mlir::tt::ttnn::Layout mlir::tt::ttnn::ToLayoutOp::getLayout ( )

◆ getLayoutAttr()

::mlir::tt::ttnn::LayoutAttr mlir::tt::ttnn::ToLayoutOp::getLayoutAttr ( )
inline

◆ getLayoutAttrName() [1/2]

::mlir::StringAttr mlir::tt::ttnn::ToLayoutOp::getLayoutAttrName ( )
inline

◆ getLayoutAttrName() [2/2]

::mlir::StringAttr mlir::tt::ttnn::ToLayoutOp::getLayoutAttrName ( ::mlir::OperationName  name)
inlinestatic

◆ getMemoryConfig()

std::optional<::mlir::tt::ttnn::MemoryConfigAttr > mlir::tt::ttnn::ToLayoutOp::getMemoryConfig ( )

◆ getMemoryConfigAttr()

::mlir::tt::ttnn::MemoryConfigAttr mlir::tt::ttnn::ToLayoutOp::getMemoryConfigAttr ( )
inline

◆ getMemoryConfigAttrName() [1/2]

::mlir::StringAttr mlir::tt::ttnn::ToLayoutOp::getMemoryConfigAttrName ( )
inline

◆ getMemoryConfigAttrName() [2/2]

::mlir::StringAttr mlir::tt::ttnn::ToLayoutOp::getMemoryConfigAttrName ( ::mlir::OperationName  name)
inlinestatic

◆ getODSOperandIndexAndLength()

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

◆ getODSOperands()

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

◆ getODSResultIndexAndLength()

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

◆ getODSResults()

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

◆ getOperationName()

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

◆ getPropertiesAsAttr()

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

◆ getResult()

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

◆ populateInherentAttrs()

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

◆ readProperties()

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

◆ removeDtypeAttr()

::mlir::Attribute mlir::tt::ttnn::ToLayoutOp::removeDtypeAttr ( )
inline

◆ removeMemoryConfigAttr()

::mlir::Attribute mlir::tt::ttnn::ToLayoutOp::removeMemoryConfigAttr ( )
inline

◆ setDtype()

void mlir::tt::ttnn::ToLayoutOp::setDtype ( ::std::optional<::mlir::tt::DataType attrValue)

◆ setDtypeAttr()

void mlir::tt::ttnn::ToLayoutOp::setDtypeAttr ( ::mlir::tt::DataTypeAttr  attr)
inline

◆ setInherentAttr()

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

◆ setLayout()

void mlir::tt::ttnn::ToLayoutOp::setLayout ( ::mlir::tt::ttnn::Layout  attrValue)

◆ setLayoutAttr()

void mlir::tt::ttnn::ToLayoutOp::setLayoutAttr ( ::mlir::tt::ttnn::LayoutAttr  attr)
inline

◆ setMemoryConfigAttr()

void mlir::tt::ttnn::ToLayoutOp::setMemoryConfigAttr ( ::mlir::tt::ttnn::MemoryConfigAttr  attr)
inline

◆ setPropertiesFromAttr()

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

◆ verifyInherentAttrs()

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

◆ verifyInvariants()

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

◆ verifyInvariantsImpl()

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

◆ writeProperties()

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

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