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!
If you'd like to share more information, please report an issue on GitHub
π What went wrong?