IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

concat_shape_impl

def concat_shape_impl[dtype: DType, rank: Int, size: Int, io_spec: IOSpec[io_spec.mut, io_spec.input]](axis0: Int, inputs: VariadicTensors[size, io_spec, static_specs=inputs.static_specs]) -> IndexList[rank]

Computes the concatenated output shape from the input tensor shapes.

Parameters:

  • ​dtype (DType): Element type of the input tensors.
  • ​rank (Int): Number of dimensions in each input tensor.
  • ​size (Int): Number of variadic input tensors.
  • ​io_spec (IOSpec[io_spec.mut, io_spec.input]): Input/output specification for the variadic tensors.

Args:

Returns:

IndexList[rank]: The output shape with the concat axis dimension summed across all inputs.