IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/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. /max/get-started.md).

Mojo function

reduce_max_shape

def reduce_max_shape[input_rank: Int, input_type: DType, axis: Int](input: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=input.static_spec]) -> IndexList[input_rank]

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

Parameters:

  • ​input_rank (Int): Number of dimensions in the input and output tensors.
  • ​input_type (DType): Element type of the input tensor.
  • ​axis (Int): Dimension along which to take the maximum of input.

Args:

Returns:

IndexList[input_rank]: The output shape after reducing input along axis by maximum.