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_internal

def register_internal(name: StringSlice[StaticConstantOrigin])

Registers the given mojo function as an implementation of an mo op or a mo.custom op. Used by built-in MAX Graph operations.

For registering custom operations, use the @compiler.register decorator, instead.

For instance:

@register_internal("mo.add")
def my_op[...](...):
  ...

Registers my_op as an implementation of mo.add.

Args:

  • name (StringSlice[StaticConstantOrigin]): The name of the op to register.