For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
Mul
struct Mul
Registers the mo.mul graph op with the graph compiler.
Implemented traitsβ
AnyType,
ElementwiseBinaryOp,
ImplicitlyDeletable
Methodsβ
elementwiseβ
static def elementwise[dtype: DType, width: SIMDLength](lhs: SIMD[dtype, width], rhs: SIMD[dtype, width]) -> SIMD[dtype, width]
Returns:
static def elementwise[dtype: DType, LayoutType: TensorLayout](lhs: TileTensor[dtype, LayoutType, MutAnyOrigin], rhs: TileTensor[dtype, LayoutType, MutAnyOrigin]) -> TileTensor[dtype, LayoutType, MutAnyOrigin]
Element-wise multiply two tiles in place into lhs; see _elementwise_tile.
Parameters:
- βdtype (
DType): The element type of the operands and the returned tile. - βLayoutType (
TensorLayout): The static memory layout shared by both tiles.
Args:
- βlhs (
TileTensor[dtype, LayoutType, MutAnyOrigin]): Left operand tile; also the in-place result and return value. - βrhs (
TileTensor[dtype, LayoutType, MutAnyOrigin]): Right operand tile of the element-wise product.
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!