From: Andi Kleen <andi@firstfloor.org>
To: Andrew Senkevich <andrew.n.senkevich@gmail.com>
Cc: libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [RFC] How to add vector math functions to Glibc
Date: Sun, 21 Sep 2014 16:31:00 -0000 [thread overview]
Message-ID: <87y4tdgckw.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <CAMXFM3tjquzniXP1weqxSVFJyhXqsf2PHuyrrrmqp7K0ZzORqA@mail.gmail.com> (Andrew Senkevich's message of "Thu, 18 Sep 2014 17:48:19 +0400")
Andrew Senkevich <andrew.n.senkevich@gmail.com> writes:
> due to latest OpenMP and CilkPlus features supported in GCC vectorized
> math functions can be utilized more widely. So we need to find general
> way how to add vectorized math functions to Glibc.
> Lets discuss the following questions which were raised after first
> patch x86_64 specific was sent.
>
> 1. Should functions go in libm or a separate libmvec library?
I would just put them into libm. Simplifies things for everyone.
>
> 2. What requirements on the compiler / assembler versions used are imposed
> by the requirement that the ABI provided by glibc's shared libraries must
> not depend on the tools used to build glibc, and what such requirements is
> it OK to impose (it may be OK to move to GCC 4.6 as minimum compiler at
> present, but requiring a more recent version would be a problem; we'd need
> to consider what binutils version we can require)? If a separate libmvec
> is used, is it OK simply not to build it if those requirements aren't met?
Requiring newer binutils should be fine. I believe glibc has done that
in the past.
> (It's definitely not OK for the ABI of a library to vary incompatibly, but
> it might be OK for the presence of a library to be conditional.)
It would be even fine to leave out the symbols from a libm
in this case. The error message to the user should be of similar
quality as for a missing library (in fact likely better)
> 6. How do we handle different glibc versions having vectorized functions
> for different vector ISA extensions?
If your glibc does not not support what you compiled for the dynamic
linker will just error out. Seems reasonable to me.
>
> 7. Note that if we're relying on #pragma omp declare simd meaning a precise
> set of function versions are available - with a guarantee that no future
> compiler version will interpret is also meaning an AVX512 version is
> available, for example, so that it's safely possible to use older
> glibc
I guess that would need an (new?) option to gcc to declare what it
can expect to be available in the library? With distributions
setting the default at gcc build time.
-Andi
next prev parent reply other threads:[~2014-09-21 16:31 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 13:48 Andrew Senkevich
2014-09-18 13:57 ` Andrew Senkevich
2014-09-18 17:05 ` Joseph S. Myers
2014-09-22 11:48 ` Andrew Senkevich
2014-09-22 12:37 ` Joseph S. Myers
2014-09-24 19:46 ` Andrew Senkevich
2014-09-24 20:19 ` Joseph S. Myers
2014-09-25 15:18 ` Andrew Senkevich
2014-09-25 15:40 ` H.J. Lu
2014-09-25 19:27 ` Carlos O'Donell
2014-09-25 19:37 ` H.J. Lu
2014-09-25 19:55 ` Carlos O'Donell
2014-09-25 20:03 ` H.J. Lu
2014-09-25 20:48 ` Carlos O'Donell
2014-09-26 13:46 ` Andrew Senkevich
2014-09-26 14:13 ` Carlos O'Donell
2014-09-26 14:15 ` Carlos O'Donell
2014-09-30 15:00 ` Andrew Senkevich
2014-09-30 15:44 ` Andreas Schwab
2014-09-30 15:53 ` Andrew Senkevich
2014-09-30 16:16 ` Andreas Schwab
2014-09-30 16:30 ` Andrew Senkevich
2014-09-30 16:35 ` Joseph S. Myers
2014-09-30 18:40 ` Christoph Lauter
2014-09-30 20:15 ` Joseph S. Myers
2014-10-02 11:55 ` Andrew Senkevich
2014-10-02 14:21 ` Joseph S. Myers
2014-10-09 17:10 ` Andrew Senkevich
2014-10-09 17:39 ` Andreas Schwab
2014-10-09 17:46 ` Joseph S. Myers
2014-10-09 17:45 ` Joseph S. Myers
2014-10-10 13:27 ` Andrew Senkevich
2014-10-10 15:23 ` Joseph S. Myers
2014-10-16 16:37 ` Andrew Senkevich
2014-10-16 21:51 ` Joseph S. Myers
2014-10-21 13:20 ` Andrew Senkevich
2014-10-21 15:29 ` Joseph S. Myers
2014-10-23 19:23 ` Andrew Senkevich
2014-10-23 21:37 ` Joseph S. Myers
2014-10-27 14:00 ` Andrew Senkevich
2014-10-27 14:39 ` Joseph S. Myers
2014-10-29 13:00 ` Andrew Senkevich
2014-10-29 18:50 ` Joseph S. Myers
2014-10-30 12:15 ` Andrew Senkevich
2014-10-30 13:55 ` Joseph S. Myers
2014-10-30 20:07 ` Joseph S. Myers
2014-10-31 10:24 ` Andrew Senkevich
2014-11-06 20:51 ` Andrew Senkevich
2014-11-14 15:45 ` Andrew Senkevich
2014-11-14 16:51 ` Joseph Myers
2014-11-18 19:06 ` Andrew Senkevich
2014-11-18 22:49 ` Joseph Myers
2014-09-30 18:40 ` Andrew Senkevich
2014-09-30 20:03 ` Joseph S. Myers
2014-10-01 13:26 ` Andrew Senkevich
2014-10-01 13:46 ` Joseph S. Myers
2014-10-01 18:47 ` Andrew Senkevich
2014-09-26 15:03 ` H.J. Lu
2014-09-26 15:48 ` Carlos O'Donell
2014-09-26 16:08 ` H.J. Lu
2014-09-26 17:55 ` Carlos O'Donell
2014-09-26 18:06 ` H.J. Lu
2014-09-30 16:17 ` Andrew Pinski
2014-09-18 15:37 ` H.J. Lu
2014-09-18 17:29 ` Andrew Senkevich
2014-09-21 16:31 ` Andi Kleen [this message]
2014-09-25 19:43 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4tdgckw.fsf@tassilo.jf.intel.com \
--to=andi@firstfloor.org \
--cc=andrew.n.senkevich@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).