Skip to main content




Declares an elementwise operator.

This decorator marks an op as being elementwise. This implies that the op represents a lambda that should be executed in the inner loop of an elementwise function.

For example:

from max.extensibility import Tensor
from max import register

fn my_add[
type: DType, rank: Int
](x: Tensor[type, rank], y: Tensor[type, rank]) -> Tensor[type, rank]: