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

register_shape_function

def register_shape_function(name: StringSlice[ImmStaticOrigin])

Registers a standalone shape function for a MAX Graph op.

The decorated function computes the output shapes of the named op from its input shapes at compile time, without executing the op itself.

Args:

  • name (StringSlice[ImmStaticOrigin]): The name of the op whose output shapes the function computes.

Was this page helpful?