Re: [eigen] Choosing the right vector implementation at run time

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Dynamic dispatch at the lower packet level would prevent inlining and significantly reduce performance.  You would probably need to do the dynamic dispatch in your own higher-level code.  There is some somewhat related discussion here: https://gitlab.com/libeigen/eigen/-/issues/2344

Eigen is header-only, so distributions don't provide binaries of eigen directly.

On Fri, Nov 19, 2021, 2:42 AM Ludovic Courtès <ludovic.courtes@xxxxxxxx> wrote:
Hello,

Looking at ‘ConfigureVectorization.h’, the vectorized implementation is
chosen at compilation time based on the compiler’s cpp macros.

This is unfortunate because distributions that provide binaries (Debian,
Fedora, etc.) end up having to distribute the most common denominator
for the architecture, which rules out SSE3, AVX, etc. on x86_64.

One solution might be, for compilers that support it, to change #ifdefs
to calls to ‘__builtin_cpu_supports’:

  https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions

I suppose the main issue is that the size of data types defined in
‘Core/arch’ also depends on compile-time features.

What are your thoughts about this?

Thanks,
Ludovic.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/