ttnn.abs
(tt::ttnn::AbsOp)
Eltwise absolute.
Eltwise absolute operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.add
(tt::ttnn::AddOp)
Eltwise add.
Eltwise add operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.alloc
(tt::ttnn::AllocOp)
Alloc op.
Tensor Alloc operation
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
address | ::mlir::IntegerAttr | 64-bit signless integer attribute |
size | ::mlir::IntegerAttr | 64-bit signless integer attribute |
memory_space | ::mlir::tt::MemorySpaceAttr | TT MemorySpace{{% markdown %}}Enum cases: * system (`System`) * mmio (`SystemMMIO`) * dram (`DeviceDRAM`) * l1 (`DeviceL1`){{% /markdown %}} |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.concat
(tt::ttnn::ConcatOp)
Concat op.
Concat tensors along a given dimension.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
dim | ::mlir::IntegerAttr | 32-bit signed integer attribute |
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.conv2d
(tt::ttnn::Conv2dOp)
Conv2d operation.
Applies a 2D convolution over an input image composed of several input planes.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
in_channels | ::mlir::IntegerAttr | 32-bit signless integer attribute |
out_channels | ::mlir::IntegerAttr | 32-bit signless integer attribute |
batch_size | ::mlir::IntegerAttr | 32-bit signless integer attribute |
input_height | ::mlir::IntegerAttr | 32-bit signless integer attribute |
input_width | ::mlir::IntegerAttr | 32-bit signless integer attribute |
kernel_height | ::mlir::IntegerAttr | 32-bit signless integer attribute |
kernel_width | ::mlir::IntegerAttr | 32-bit signless integer attribute |
stride_height | ::mlir::IntegerAttr | 32-bit signless integer attribute |
stride_width | ::mlir::IntegerAttr | 32-bit signless integer attribute |
padding_height | ::mlir::IntegerAttr | 32-bit signless integer attribute |
padding_width | ::mlir::IntegerAttr | 32-bit signless integer attribute |
dilation_height | ::mlir::IntegerAttr | 32-bit signless integer attribute |
dilation_width | ::mlir::IntegerAttr | 32-bit signless integer attribute |
groups | ::mlir::IntegerAttr | 32-bit signless integer attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
weight | ranked tensor of any type values |
bias | ranked tensor of any type values |
output | ranked tensor of any type values |
device | TT device |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.dealloc
(tt::ttnn::DeallocOp)
Dealloc op.
Tensor Dealloc operation
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
ttnn.div
(tt::ttnn::DivOp)
Eltwise divide.
Eltwise divide operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.embedding
(tt::ttnn::EmbeddingOp)
Embedding op.
Embedding operation.
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
weight | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.empty
(tt::ttnn::EmptyOp)
Empty op.
Tensor empty operation
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
shape | ::mlir::tt::ttnn::ShapeAttr | TTNN Shape attribute{{% markdown %}} TTNN shape attribute {{% /markdown %}} |
dtype | ::mlir::tt::DataTypeAttr | TT DataTypes{{% markdown %}}Enum cases: * f32 (`Float32`) * f16 (`Float16`) * bf16 (`BFloat16`) * bfp_f8 (`BFP_Float8`) * bfp_bf8 (`BFP_BFloat8`) * bfp_f4 (`BFP_Float4`) * bfp_bf4 (`BFP_BFloat4`) * bfp_f2 (`BFP_Float2`) * bfp_bf2 (`BFP_BFloat2`) * u32 (`UInt32`) * u16 (`UInt16`) * u8 (`UInt8`){{% /markdown %}} |
layout | ::mlir::tt::ttnn::LayoutAttr | TTNN Layout{{% markdown %}}Enum cases: * row_major (`RowMajor`) * tile (`Tile`) * invalid (`Invalid`){{% /markdown %}} |
memory_config | ::mlir::tt::ttnn::MemoryConfigAttr | TTNN MemoryConfig attribute{{% markdown %}} TTNN memory config attribute {{% /markdown %}} |
Operands:
Operand | Description |
---|---|
device | TT device |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.exp
(tt::ttnn::ExpOp)
Eltwise exponential.
Eltwise exponential operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.full
(tt::ttnn::FullOp)
Full op.
Tensor full operation
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
fillValue | ::mlir::FloatAttr | 32-bit float attribute |
Operands:
Operand | Description |
---|---|
device | TT device |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.get_device
(tt::ttnn::GetDeviceOp)
Get Device op.
This op returns the current runtime device.
Results:
Result | Description |
---|---|
device | TT device |
ttnn.ge
(tt::ttnn::GreaterEqualOp)
Eltwise greater than or equal to.
Eltwise greater than or equal to operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.matmul
(tt::ttnn::MatmulOp)
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
a | ranked tensor of any type values |
b | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.max
(tt::ttnn::MaxOp)
Max reduction op.
Max reduction op.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
keep_dim | ::mlir::BoolAttr | bool attribute |
dim_arg | ::mlir::ArrayAttr | 32-bit integer array attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.max_pool2d
(tt::ttnn::MaxPool2dOp)
Applies a 2D max pooling over an input signal composed of several input planes.
Applies a 2D max pooling over an input signal composed of several input planes.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
batch_size | ::mlir::IntegerAttr | 32-bit signed integer attribute |
input_height | ::mlir::IntegerAttr | 32-bit signed integer attribute |
input_width | ::mlir::IntegerAttr | 32-bit signed integer attribute |
channels | ::mlir::IntegerAttr | 32-bit signed integer attribute |
kernel_height | ::mlir::IntegerAttr | 32-bit signed integer attribute |
kernel_width | ::mlir::IntegerAttr | 32-bit signed integer attribute |
stride_height | ::mlir::IntegerAttr | 32-bit signed integer attribute |
stride_width | ::mlir::IntegerAttr | 32-bit signed integer attribute |
dilation_height | ::mlir::IntegerAttr | 32-bit signed integer attribute |
dilation_width | ::mlir::IntegerAttr | 32-bit signed integer attribute |
ceil_mode | ::mlir::BoolAttr | bool attribute |
padding_height | ::mlir::IntegerAttr | 32-bit signed integer attribute |
padding_width | ::mlir::IntegerAttr | 32-bit signed integer attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
output | ranked tensor of any type values |
device | TT device |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.maximum
(tt::ttnn::MaximumOp)
Eltwise maximum OP.
Calculates maximum of input tensors' values element-wise and stores result in output tensor.
Example: %lhs: [[3, 2, 7], [1, 4, 4]] %rhs: [[1, 4, 2], [1, 2, 3]] "ttnn.maximum"(%lhs, %rhs, %out) -> %out: [[3, 4, 7], [1, 4, 4]]
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.mean
(tt::ttnn::MeanOp)
Mean reduction op.
Mean reduction op.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
keep_dim | ::mlir::BoolAttr | bool attribute |
dim_arg | ::mlir::ArrayAttr | 32-bit integer array attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.multiply
(tt::ttnn::MultiplyOp)
Eltwise multiply.
Eltwise multiply operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.neg
(tt::ttnn::NegOp)
Eltwise negate.
Eltwise negate operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.reciprocal
(tt::ttnn::ReciprocalOp)
Eltwise reciprocal.
Eltwise reciprocal operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.relu
(tt::ttnn::ReluOp)
Eltwise ReLU.
Eltwise ReLU operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.reshape
(tt::ttnn::ReshapeOp)
Reshape op.
Reshape tensor.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
shape | ::mlir::ArrayAttr | 32-bit integer array attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.sigmoid
(tt::ttnn::SigmoidOp)
Eltwise sigmoid.
Eltwise sigmoid operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.softmax
(tt::ttnn::SoftmaxOp)
Softmax op.
Softmax operation.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
dimension | ::mlir::IntegerAttr | 32-bit signed integer attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.sqrt
(tt::ttnn::SqrtOp)
Eltwise sqrt.
Eltwise sqrt operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.subtract
(tt::ttnn::SubtractOp)
Eltwise subtract.
Eltwise subtract operation.
Traits: AttrSizedOperandSegments
Interfaces: DestinationStyleOpInterface
Operands:
Operand | Description |
---|---|
inputs | variadic of ranked tensor of any type values |
outputs | variadic of ranked tensor of any type values |
Results:
Result | Description |
---|---|
results | variadic of ranked tensor of any type values |
ttnn.sum
(tt::ttnn::SumOp)
Sum reduction op.
Sum reduction op.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
keep_dim | ::mlir::BoolAttr | bool attribute |
dim_arg | ::mlir::ArrayAttr | 32-bit integer array attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.to_device
(tt::ttnn::ToDeviceOp)
ToDevice op.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
memory_config | ::mlir::tt::ttnn::MemoryConfigAttr | TTNN MemoryConfig attribute{{% markdown %}} TTNN memory config attribute {{% /markdown %}} |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
device | TT device |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.to_layout
(tt::ttnn::ToLayoutOp)
ToLayout op.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
layout | ::mlir::tt::ttnn::LayoutAttr | TTNN Layout{{% markdown %}}Enum cases: * row_major (`RowMajor`) * tile (`Tile`) * invalid (`Invalid`){{% /markdown %}} |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
device | TT device |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.to_memory_config
(tt::ttnn::ToMemoryConfigOp)
ToMemoryConfig op.
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
device | TT device |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |
ttnn.transpose
(tt::ttnn::TransposeOp)
Transpose op.
Transpose tensor along two given dimensions.
Interfaces: DestinationStyleOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
dim0 | ::mlir::IntegerAttr | 32-bit signed integer attribute |
dim1 | ::mlir::IntegerAttr | 32-bit signed integer attribute |
Operands:
Operand | Description |
---|---|
input | ranked tensor of any type values |
output | ranked tensor of any type values |
Results:
Result | Description |
---|---|
result | ranked tensor of any type values |