Mojo function
custom
custom[name: StringLiteral](values: List[Symbol, 0], out_type: Type) -> 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 tomax.register.op
.
Args:
- values (
List[Symbol, 0]
): The op function's arguments. - out_type (
Type
): The op function's return type.
Returns:
A symbolic value representing the output of the op in the graph.
custom[name: StringLiteral](values: List[Symbol, 0], out_types: List[Type, 0]) -> List[Symbol, 0]
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 tomax.register.op
.
Args:
- values (
List[Symbol, 0]
): The op function's arguments. - out_types (
List[Type, 0]
): The list of 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
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!