This is the mail archive of the libc-alpha@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: [PATCH 1/N] x86_64 vectorization support: vectorized math functions addition to Glibc


On Thu, 11 Sep 2014, Zamyatin, Igor wrote:

> > > * How do we handle different glibc versions having vectorized
> > > functions for different vector ISA extensions?  You're using a single
> > > __DECL_SIMD, and having such a function only for AVX2.  But one glibc
> > > version could have a function vectorized for ISA extensions A and B,
> > > with another version adding it vectorized for C.  The compiler the
> > > user uses with the installed glibc headers must be able to tell from
> > > those headers which functions have what vectorized versions.  That is,
> > > if a glibc version is released where _Pragma ("omp declare simd") is
> > > used with a function that only has an AVX2 vectorized version, no past
> > > or future GCC version can interpret that pragma as meaning that any
> > > version other than AVX2 is available (it must be possible to use any
> > > installed glibc headers with both past and future compilers).
> 
> We can require providing versions for all possible ISAs (we are going to 
> do this for x86) so compiler should do all work itself.

That doesn't answer my question.  Maybe glibc 2.21 provides such versions 
for all x86 ISAs there are at present, up to AVX512 - and then a new 
extension AVX1024 appears.  When GCC 7 is used with glibc 2.21 headers and 
-mavx1024, it must not try to generate calls to the AVX1024 functions, 
because glibc 2.21 doesn't have such functions.  But maybe glibc 2.26 adds 
the AVX1024 functions.  So something needs to be different in the headers 
of 2.26 to inform GCC 7 that AVX1024 versions of the functions are 
available.  And I think that means the directive that communicates 
function availability to the compiler needs to identify the set of ISAs 
for which versions of the function in question are available.

-- 
Joseph S. Myers
joseph@codesourcery.com


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