I have a question about loop vectorization, OpenMP, and libmvec.  I am
experimenting with this on Aarch64 and looking at what exists on x86
and trying to understand the relationship (if there is one) between the
vector library (libmvec) and OpenMP (libgomp).

On x86, an OpenMP loop with a sin() call will call a function whose
name is defined by the OpenMP x86 ABI (_ZGVbN2v_sin) but if I just
vectorize a normal, non-OpenMP loop containing a sin() call and specify
'-mveclibabi=[svml|acml]' then I get a call to some thing else
(vmldSin2 or __vrd2_sin).  If I do not specify '-mveclibabi' then a
loop with a sin() in it doesn't get vectorized at all.

On Aarch64, where there is no existing vector library (at least not one
recognized by GCC), what do I want to do?  Obviously, for OpenMP, I
would call the name specified by an Aarch64 OpenMP ABI (not yet
publicly defined).  It would be something like '_ZGVbN2v_sin'.  But
what about the case of a vectorized loop that does not use OpenMP.  Is
it reasonable (desirable?) in that case to call the OpenMP routine
(_ZGVbN2v_sin) that is defined in libgomp or should I call a different
routine with a different name that is in libmvec?  Or should I put
'_ZGVbN2v_sin' in libmvec and have libgomp be dependent on libmvec?  Do
I need a -mveclibabi flag for GCC if there is only one vector ABI for
Aarch64?  I might still want to control whether vector functions are
called while vectorizing a loop in the absense of OpenMP.

Steve Ellcey

Reply via email to