Skip to main content

function

custom_nv

custom_nv[name: StringLiteral](values: List[Symbol], out_types: List[Type]) -> List[Symbol]

Creates a node to execute a custom graph operation in the graph.

The custom op should be registered by annotating a function with the max.register.op decorator.

Parameters:

  • name (StringLiteral): The op name provided to max.register.op.

Args:

  • values (List[Symbol]): The op function's arguments.
  • out_types (List[Type]): The op function's return type.

Returns:

Symbolic values representing the outputs of the op in the graph. These correspond 1:1 with the types passed as out_types.