Re:LFortran: Modern interactive LLVM-based Fortran compiler
by waltpad on Friday July 03, 2020 @03:35AM
(#23721860)
If you have a look at the different fortran implementations of BLAS gemm (matrix multiplication), you'll see that the transposed matrix cases are treated specifically. In fact, IIRC, the gemm function has flags to indicate for each matrix if it is transposed.
[ Parent
| on HN ]
Re:LFortran: Modern interactive LLVM-based Fortran compiler
by celrod on Friday July 03, 2020 @09:39AM
(#23723899)
That's what I did when calling OpenBLAS and MKL, but I confess I don't know the internal details of a non-inlined `matmul` call in gfortran when you don't use `-fexternal-blas`.
Just writing three loops and letting the compiler optimize it was much faster for `A * B'`, so it must be a pretty naive implementation getting called.