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

reduce_add_shape

def reduce_add_shape[axis: Int](input: T) -> IndexList[T.rank]

Computes the output shape for the mo.reduce.add graph op.

Parameters:

  • ​axis (Int): Dimension along which to sum the elements of input.

Args:

  • ​input (T): Input tensor reduced along axis by summation.

Returns:

IndexList[T.rank]: The output shape after reducing input along axis by summation.

Was this page helpful?