Mojo function
tile
tile[type: DType, type_repeats: DType](input: LayoutTensor[type, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], repeats: LayoutTensor[type_repeats, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], output: LayoutTensor[type, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment])
Implements the Tile
operator from the ONNX spec. This behaves like Numpy tile, but without broadcast.
Parameters:
- type (
DType
): Type of the input and output tensors. - type_repeats (
DType
): Type of the repeats tensor.
Args:
- input (
LayoutTensor[type, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment]
): The input tensor. Currently <= 4 dimensions are supported. - repeats (
LayoutTensor[type_repeats, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment]
): One-dimensional tensor that specifies the number of repeated copies along each of the input's dimensions. Length equals input tensor rank. - output (
LayoutTensor[type, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment]
): The output tensor. Has the same dimensions and type as input.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!