Skip to main content

matmul_shape

Function matmul_shape 

Source
pub fn matmul_shape(lhs: &[i64], rhs: &[i64]) -> Vec<i64>
Expand description

§6.20-0008 matmul (contraction) shape rule: role-vector-derived (KISS-Classify §6.6-0016 M/N/K axis roles, carried as roles not a ShapeExpr). For the canonical same-rank ≥ 2 cell lhs[..batch, M, K] · rhs[..batch, K, N] -> [..batch, M, N]; the output equals neither operand (§6.20-0008).