tt.get_tuple_element
(tt::GetTupleElementOp)
GetTupleElement operation
Syntax:
operation ::= `tt.get_tuple_element` $operand `[` $index `]` attr-dict `:` functional-type(operands, results)
Extracts element at index
position of the operand
tuple and produces a result
.
Example:
%result = tt.get_tuple_element %operand[0] : (tuple<tensor<32x32xbf16>, tensor<1x32xf32>>) -> tensor<32x32xbf16>
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
index | ::mlir::IntegerAttr | 32-bit signless integer attribute whose value is non-negative |
Operands:
Operand | Description |
---|---|
operand | nested tuple with any combination of ranked tensor of any type values values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
tt.tuple
(tt::TupleOp)
Tuple operation
Syntax:
operation ::= `tt.tuple` $operands attr-dict `:` custom<TupleOpType>(type($operands), type($result))
Produces a result
tuple from operands operands
.
Example:
%result = tt.tuple %operand0, %operand1 : tuple<tensor<32xbf16, tensor<1x32xf32>>
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable
, InferTypeOpInterface
, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
Operand | Description |
---|---|
operands | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | nested tuple with any combination of ranked tensor of any type values values |