Skip to content
fn

mm_op

→TensorImplPtr
int mm_op(const int & a, const int & b)

Python wrappers

Public Python APIs implemented by this engine symbol.

Strict 2-D matrix multiply: C=A⋅BC = A \cdot B.

Composite — rank-checked alias of matmul_op that rejects inputs of rank ≠2\ne 2 up front so the error message names mm rather than the planner. Gradient flows through MatmulBackward.

Math

Cij=∑kAik Bkj C_{ij} = \sum_{k} A_{ik} \, B_{kj}

See Also

matmul_op — generalised version with broadcasting and 1-D vector promotion; bmm_op — strict batched variant.

Parameters

aTensorImplPtr
Left operand of shape (M, K).
bTensorImplPtr
Right operand of shape (K, N).

Returns

TensorImplPtr

Tensor of shape (M, N).

Raises

Failure
If either input is null or not exactly 2-D.