3 ms·
Often (in the scientific computing communities that I am in) large tensor contractions are done by reshaping tensors into matrices, transposing, and using matri
by comnetxr 9y ago
Often (in the scientific computing communities that I am in) large tensor contractions are done by reshaping tensors into matrices, transposing, and using matrix multiplication. The contraction time can change dramatically based on the order one contracts the tensors and the relative sizes of the tensors. It seems this just uses a large nested for loop - how does this strategy compare to using dedicated matrix multiplication algorithms?
- lsorber 9y agoAn efficient xgemm kernel is probably faster than the code that taco generates if you don't need to permute your tensor. A contraction like B(i,k) = T(i,j,k) * A(j) would require a permutation of T before you could run the matrix multiplication though, while taco can just keep the data in-place.