Skip to main content

Mojo function

register_internal

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.