For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
outer_product_acc
def outer_product_acc(res: TileTensor[Engine=res.Engine, address_space=res.address_space, linear_idx_type=res.linear_idx_type], lhs: TileTensor[Engine=lhs.Engine, address_space=lhs.address_space, linear_idx_type=lhs.linear_idx_type], rhs: TileTensor[Engine=rhs.Engine, address_space=rhs.address_space, linear_idx_type=rhs.linear_idx_type])
Updates result tensor with the outer product of two vectors.
Computes res += outer(lhs, rhs) where lhs and rhs are vectors and
res is a matrix. Vectorized tensors multiply element-wise, so the three
tensors must share one element_size.
Constraints:
All tensors must have statically known shapes.
res must be rank 2.
lhs and rhs must be rank 1.
res.dim[0]() must equal lhs.dim[0](), and res.dim[1]() must
equal rhs.dim[0]().
Args:
- โres (
TileTensor[Engine=res.Engine, address_space=res.address_space, linear_idx_type=res.linear_idx_type]): The result matrix to accumulate into, shape (M, N). - โlhs (
TileTensor[Engine=lhs.Engine, address_space=lhs.address_space, linear_idx_type=lhs.linear_idx_type]): The left-hand side vector, shape (M,). - โrhs (
TileTensor[Engine=rhs.Engine, address_space=rhs.address_space, linear_idx_type=rhs.linear_idx_type]): The right-hand side vector, shape (N,).