Class PushTensorOp

Inheritance Relationships

Base Type

  • public mlir::Op< PushTensorOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands< 2 >::Impl, ::mlir::OpTrait::OpInvariants >

Class Documentation

class PushTensorOp : public mlir::Op<PushTensorOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants>

Public Types

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

Public Functions

inline ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames()
inline std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index)
inline ::mlir::Operation::operand_range getODSOperands(unsigned index)
inline ::mlir::TypedValue<::mlir::RankedTensorType> getTokenTensor()
inline ::mlir::TypedValue<::mlir::dfg::InputType> getWritePort()
inline ::mlir::OpOperand &getTokenTensorMutable()
inline ::mlir::OpOperand &getWritePortMutable()
inline std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index)
inline ::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &p)

Prints a dfg::PushTensorOp in the custom assembly syntax consumed by parse.

Emits tokenTensor to writePort : portType.

::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifyInvariants()

Public Static Functions

static inline constexpr ::llvm::StringLiteral getOperationName()
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static ::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)
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value tokenTensor, Value writePort)

Builds a dfg::PushTensorOp that writes a ranked tensor to a shaped port.

Parameters:
  • tokenTensor – The ranked-tensor value to write.

  • writePort – The shaped dfg::InputType port to write to.

static PushTensorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value tokenTensor, Value writePort)
static PushTensorOp create(::mlir::ImplicitLocOpBuilder &builder, Value tokenTensor, Value writePort)
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Parses a dfg::PushTensorOp from its custom assembly syntax.

The expected syntax is:

`dfg.push_tensor` %tokenTensor `to` %writePort `:` port-type

The tensor token type is resolved as a RankedTensorType derived from the port’s shape and element type and is not written explicitly.

static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)

Public Static Attributes

static constexpr int odsIndex_token_tensor = 0
static constexpr int odsIndex_write_port = 1