Warning:
 This function does not broadcast.

Note:
 This function is implemented by chaining "torch.mm()" calls after
 computing the optimal matrix multiplication order.

Note:
 The cost of multiplying two matrices with shapes *(a, b)* and
 *(b, c)* is *a * b * c*. Given matrices *A*, *B*, *C* with shapes
 *(10, 100)*, *(100, 5)*, *(5, 50)* respectively, we can calculate
 the cost of different multiplication orders as follows:

    \begin{align*} \operatorname{cost}((AB)C) &= 10 \times 100
    \times 5 + 10 \times 5 \times 50 = 7500 \\
    \operatorname{cost}(A(BC)) &= 10 \times 100 \times 50 + 100
    \times 5 \times 50 = 75000 \end{align*}

 In this case, multiplying *A* and *B* first followed by *C* is 10
 times faster.

Parameters:
      tensors (Sequence[Tensor]) -- two or more tensors to
      multiply. The first and last tensors may be 1D or 2D. Every
      other tensor must be 2D.
Keyword Arguments: