Mark Adams <[email protected]> writes: > On Sun, Nov 12, 2017 at 11:35 PM, Xiangdong <[email protected]> wrote: > >> Hello everyone, >> >> Can someone comment on the vectorization of PETSc? For example, for the >> MatMult function, will it perform better or run faster if it is compiled >> with avx2 or avx512? >> > > There are no AVX instructions that I know of in PETSCc, but there are > kernels from 3rd parties that are: 1) the 'hypre' AMG solver and 2) the new > MKL sparse matrix class (wraps MKL, which is probably vectorized).
There are explicit AVX/AVX512F instructions for the SELL matrix format. Many other operations will be hit-or-miss whether the compiler actually produces vectorized code or whether there would be any benefit in doing so (most operations in PETSc are limited by memory bandwidth rather than vectorization; that includes matrix-vector products on most current architectures except KNL with MCDRAM, where the SELL format is beneficial).
