This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Question about building and using libmvec
- From: Steve Ellcey <sellcey at cavium dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Carlos O'Donell <carlos at redhat dot com>, libc-help <libc-help at sourceware dot org>
- Cc: nd at arm dot com
- Date: Mon, 12 Feb 2018 09:44:54 -0800
- Subject: Re: Question about building and using libmvec
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Steve dot Ellcey at cavium dot com;
- References: <1517433450.2638.9.camel@cavium.com> <20535e83-3b58-5a15-2147-8fbbcb3246c0@redhat.com> <14a87057-cd62-2534-a4ea-e3a81901e1f0@arm.com>
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Mon, 2018-02-12 at 12:51 +0000, Szabolcs Nagy wrote:
> On 31/01/18 22:15, Carlos O'Donell wrote:
> >
> > On 01/31/2018 01:17 PM, Steve Ellcey wrote:
> > >
> > > I have a libmvec question. Should it be possible to build
> > > libmvec on any
> > > platform or is it just on x86? The only abilist I see for
> > > libmvec
> ...
> >
> > See:
> > https://sourceware.org/ml/libc-alpha/2017-03/msg00333.html
> >
> i was looking at adding vector math function implementations
> to aarch64 (there is only x86_64 asm now, we could probably
> add generic c dummy implementations which just fall back to
> scalar code and add optimized asm later, this would allow
> vectorizing some loops, but the math code would not be faster)
>
> however we need a vector abi first (to get the mangled function
> names and call abi right) this is not yet published, but in progress.
I sent email to James Greenhalgh to ask about the vector ABI.
I am not sure what the current state is.
https://gcc.gnu.org/ml/gcc/2018-02/msg00115.html
> and we need gcc support (so simd attributes/omp pragmas are
> enabled and if the vector function call convention is special
> that should be implemented too).
Someone here has done some work on this, I need to take
a look at it and make sure I understand what it is doing.
Even without this change, there is some value due to vectorization.
I.e. a loop with a sqrt currently gets vectorized on aarch64 because
there is a builtin vectorized sqrt function and the ABI doesn't matter.
> another gcc issue that would be nice to fix is to make all
> this work in fortran: currently the list of simd functions
> are described in c headers so it does not affect fortran.
> (there is no command line option to enable vectorization
> of a particular function)
Interesting, I wasn't aware of this.
> doing various benchmarks my impression is that improving
> scalar math can give bigger benefit at this point so vector
> math is lower priority for me now, but i'm still interested
> in it, once the vector abi is finalized.
Yes, we need the vector ABI, hopefully James will have an update on
that.
Steve Ellcey
sellcey@cavium.com