This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: libmvec requires x86?
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Mon, 21 Dec 2015 18:32:18 -0200
- Subject: Re: libmvec requires x86?
- Authentication-results: sourceware.org; auth=none
- References: <a082cdac8f6d571f41c5def4457c738f dot squirrel at vali dot starlink dot edu>
Hi,
On 21-12-2015 16:58, Timothy Pearson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> 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]).
[1] http://www-01.ibm.com/support/docview.wss?uid=swg27005471
[2] https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html
>
> Would it be possible to get write access to
> https://sourceware.org/glibc/wiki/libmvec 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
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
>
> iFYEARELAAYFAlZ4S8oACgkQLaxZSoRZrGHj1QDfesRSwEGYwW0wba4u151nIRIt
> NxKzmHi8ZadGMgDgsa951a5hDI+QQAdQUv+ezULdjteea6uRZmeYyg==
> =9x1w
> -----END PGP SIGNATURE-----
>