Skip to main content

Mojo function

tile

tile[dtype: DType, type_repeats: DType](input: TileTensor[dtype, input.LayoutType, input.origin, linear_idx_type=input.linear_idx_type, element_size=input.element_size], repeats: TileTensor[type_repeats, repeats.LayoutType, repeats.origin, linear_idx_type=repeats.linear_idx_type, element_size=repeats.element_size], output: TileTensor[dtype, output.LayoutType, output.origin, linear_idx_type=output.linear_idx_type, element_size=output.element_size])

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): The input tensor. Currently <= 4 dimensions are supported.
  • repeats (TileTensor): One-dimensional tensor that specifies the number of repeated copies along each of the input's dimensions. Length equals input tensor rank.
  • output (TileTensor): The output tensor. Has the same dimensions and type as input.

Was this page helpful?