Implementing kernel
C++ engine symbols that back this Python API.Strict 2-D matrix multiplication.
Computes the product of two 2-D tensors of shapes (n, k) and (k, m). No
broadcasting is performed; both operands must be exactly 2-D. For broadcasting
or batched semantics use matmul / bmm.
Parameters
Returns
TensorMatrix product of shape (n, m).
Notes
Mathematical definition:
Autograd mirrors matmul but without any batch handling. Use this
function when the rank assumption can be guaranteed for clearer error messages
and slightly leaner dispatch.
Examples
>>> import lucid
>>> a = lucid.tensor([[1.0, 2.0]])
>>> b = lucid.tensor([[3.0], [4.0]])
>>> lucid.mm(a, b)
Tensor([[11.]])