This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libmvec requires x86?


On 21-12-2015 16:58, Timothy Pearson wrote:
> Hash: SHA224
> All,
> Are there currently any plans to port libmvec to architectures other than
> x86?  I spent a rather fruitless day attempting to vectorize a floating
> point calculation loop on POWER8 before realizing that libmvec is x86
> only.  We cannot use modern x86 hardware for internal security reasons,
> and it came as something of a surprise that relatively advanced features
> of glibc are only supported on x86, even though functionally equivalent
> SIMD capabilities exist on other architectures (e,g, POWER8).

None I am aware off and it has not been explicit by any port maintainer. 
For POWER chips you can try the MASS library [1], since GCC have the option
to generate calls to libmall (-mveclibabi=mass [2]).


> Would it be possible to get write access to
> so that I can at least add a
> warning to not try to use libmvec on non-x86 architectures?

Although it is not explicit stated, the wiki page also only stated x86_64
is tested and enabled.  And on 'NEWS' it explicit stated libmvec is only
implemented for x86.

But I also thing it won't hurt to clarify this on the wiki.

> I'd be willing to try to port libmvec to POWER8 (or provide access to a VM
> on the POWER8 hardware for any developer(s) willing to work on it), but I
> don't really know where to start.  What exactly is forcing libmvec to x86
> only right now?  Missing assembly functions or something deeper?

libmvec requires architecture specific implementations for the vectorized
math library calls. You can check on the x86_64 ones at
sysdeps/x86_64/fpu/svml_*. I would expect the name convention to be the
same and controlled by -mveclibabi=abi. It might require some compiler
work to actually enable this ABI for powerpc backend.

For POWER it would expect to also have a multilib implementation (either
with POWER5+/VMX or POWER7/VSX as base), but simpler than x86_64 due
limited vectorized register size (128-bit only).  Also You do not need to
currently provide all the already implemented functions x86_64 provides.

> Thanks!
> Tim
> Version: GnuPG v1.4.11 (GNU/Linux)
> NxKzmHi8ZadGMgDgsa951a5hDI+QQAdQUv+ezULdjteea6uRZmeYyg==
> =9x1w

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]