Skip to main content

function

matmul_by_matrix

matmul_by_matrix(lhs: Symbol, rhs: Symbol) -> Symbol

Computes the matrix multiplication of two symbolic tensors.

The last two dimensions of each tensor are treated as matricies and multiplied, and the remaining dimensions are broadcast dimensions.

Args:

  • lhs (Symbol): The left-hand-side of the matmul.
  • rhs (Symbol): The right-hand-side of the matmul. Must have rank exactly 2.

Returns:

A symbolic tensor representing he result of broadcasting the two matricies together according to matmul_broadcast and then performing a matrix multiply along the last two dimension of each tensor.