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:
- βaxis0 (
Int): Axis along which to concatenate; negative values index from the last dimension. - βinputs (
VariadicTensors[size, io_spec, static_specs=inputs.static_specs]): Variadic input tensors to concatenate, all matching in shape except along the concat axis.
Returns:
IndexList[rank]: The output shape with the concat axis dimension summed across
all inputs.