tt.cpu_module
(tt::CPUModuleOp)
Module-wrapper operation for CPU ops
Syntax:
operation ::= `tt.cpu_module` attr-dict-with-keyword regions
Custom module operation that can a single ModuleOp, which should contain all funcs which should be run on CPU.
Example:
tt.cpu_module {
module {
func.func foo() { ... }
}
}
Traits: IsolatedFromAbove
, NoRegionArguments
, NoTerminator
, SingleBlock
, SymbolTable
tt.device_module
(tt::DeviceModuleOp)
Module-wrapper operation for device ops
Syntax:
operation ::= `tt.device_module` attr-dict-with-keyword $bodyRegion
Custom module operation that can a single ModuleOp, which should contain all funcs which should be run on device.
Example:
tt.device_module {
module {
func.func foo() { ... }
}
}
Traits: IsolatedFromAbove
, NoRegionArguments
, NoTerminator
, SingleBlock
, SymbolTable
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 |