For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
tile
def tile[dtype: DType, type_repeats: DType](input: TileTensor[dtype, Storage=input.Storage, linear_idx_type=input.linear_idx_type], repeats: TileTensor[type_repeats, Storage=repeats.Storage, linear_idx_type=repeats.linear_idx_type], output: TileTensor[dtype, Storage=output.Storage, linear_idx_type=output.linear_idx_type])
Implements the Tile operator from the ONNX spec. This behaves like Numpy tile, but without broadcast.
Parameters:
- βdtype (
DType): Type of the input and output tensors. - βtype_repeats (
DType): Type of the repeats tensor.
Args:
- βinput (
TileTensor[dtype, Storage=input.Storage, linear_idx_type=input.linear_idx_type]): The input tensor. Currently <= 4 dimensions are supported. - βrepeats (
TileTensor[type_repeats, Storage=repeats.Storage, linear_idx_type=repeats.linear_idx_type]): One-dimensional tensor that specifies the number of repeated copies along each of the input's dimensions. Length equals input tensor rank. - βoutput (
TileTensor[dtype, Storage=output.Storage, linear_idx_type=output.linear_idx_type]): The output tensor. Has the same dimensions and type as input.