This is the mail archive of the libc-help@sourceware.org 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: Question about building and using libmvec


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


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