My color coding is bad (and there's an open issue about it), but I haven't come up with a great solution. One idea I should add was to make everything relative to LoopVectorization, but that wouldn't help for those interested in other comparisons like Eigen vs gfortran.
I'm on gfortran 10.1.1, so I'd only be missing out on very recent improvements (i.e., to trunk).
Note that these benchmarks were dynamically sized. If you write a fortran program like
real(kind=8), dimension(10,10) :: A, B, C
! fill A and B somehow
C = matmul(A, B)
the compiler will take advantage of the known dimensions and inline the call, making it much faster.
> I would love an option to align arrays in gfortran. It’s very important to take advantage of automatic vectorisation but I haven’t found a reliable way to do it.
I wish more compilers could also use masks to vectorize without padding. If multiplying 7x7 matrices with AVX512, the obvious solution is to just mask the loads/stores of columns, without the need for padding.
Of course, padding would also ensure all your loads/stores are aligned, which can be nice.