If I have a tensor contraction
A[a,b] * B[b,c,d] = C[a,c,d]
which has the properties B[b,c,d] = B[b,d,c]
and C[a,c,d] = C[a,d,c]
, how to set up BLAS to utilize this symmetry?
Here the Einstein summation notation is assumed, i.e., repeated indices mean summation.
sgemm
http://www.netlib.org/lapack/explore-html/db/dc9/group__single__blas__level3_gafe51bacb54592ff5de056acabd83c260.html#gafe51bacb54592ff5de056acabd83c260
seems about the symmetry of a matrix, than rank-3 tensor.
I could try to flat/reshape tensor B
into a lower dimension array, but seems flat/reshape tensor also takes time, at least in Fortran.
How to speed up reshape in higher rank tensor contraction by BLAS in Fortran?