public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Martin Jambor <mjambor@suse.cz>,
	sellcey@cavium.com, Richard Biener <richard.guenther@gmail.com>,
	pmenzel+gcc.gnu.org@molgen.mpg.de
Cc: nd@arm.com, GCC Development <gcc@gcc.gnu.org>
Subject: Re: How to get GCC on par with ICC?
Date: Fri, 22 Jun 2018 22:41:00 -0000	[thread overview]
Message-ID: <9d9090a3-6af5-8525-6064-806eea0ee86b@arm.com> (raw)
In-Reply-To: <ri6vaapiqog.fsf@suse.cz>

On 11/06/18 11:05, Martin Jambor wrote:
>> The int rate numbers (running 1 copy only) were not too bad, GCC was
>> only about 2% slower and only 525.x264_r seemed way slower with GCC.
>> The fp rate numbers (again only 1 copy) showed a larger difference,
>> around 20%.  521.wrf_r was more than twice as slow when compiled with
>> GCC instead of ICC and 503.bwaves_r and 510.parest_r also showed
>> significant slowdowns when compiled with GCC vs. ICC.
>>
> 
> Keep in mind that when discussing FP benchmarks, the used math library
> can be (almost) as important as the compiler.  In the case of 481.wrf,
> we found that the GCC 8 + glibc 2.26 (so the "out-of-the box" GNU)
> performance is about 70% of ICC's.  When we just linked against AMD's
> libm, we got to 83%. When we instructed GCC to generate calls to Intel's
> SVML library and linked against it, we got to 91%.  Using both SVML and
> AMD's libm, we achieved 93%.
> 

i think glibc 2.27 should outperform amd's libm on wrf
(since i upstreamed the single precision code from
https://github.com/ARM-software/optimized-routines/ )

the 83% -> 93% diff is because gcc fails to vectorize
math calls in fortran to libmvec calls.

> That means that there likely still is 7% to be gained from more clever
> optimizations in GCC but the real problem is in GNU libm.  And 481.wrf
> is perhaps the most extreme example but definitely not the only one.

there is no longer a problem in gnu libm for the most
common single precision calls and if things go well
then glibc 2.28 will get double precision improvements
too.

but gcc has to learn how to use libmvec in fortran.

  reply	other threads:[~2018-06-22 11:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 15:57 Paul Menzel
2018-06-06 16:14 ` Joel Sherrill
2018-06-06 16:20   ` Paul Menzel
2018-06-20 22:42   ` NightStrike
2018-06-21  9:20     ` Richard Biener
2018-06-22  0:48     ` Steve Ellcey
2018-06-06 16:22 ` Bin.Cheng
2018-06-06 18:31 ` Dmitry Mikushin
2018-06-06 21:10   ` Ryan Burn
2018-06-07 10:02     ` Richard Biener
2018-06-06 22:43   ` Zan Lynx
2018-06-07  9:54     ` Richard Biener
2018-06-07 10:06 ` Richard Biener
2018-06-08 22:08   ` Steve Ellcey
2018-06-09 15:32     ` Marc Glisse
2018-06-11 14:50     ` Martin Jambor
2018-06-22 22:41       ` Szabolcs Nagy [this message]
2018-06-15 11:48 Wilco Dijkstra
2018-06-15 17:03 ` Jeff Law
2018-06-15 18:01   ` Joseph Myers

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=9d9090a3-6af5-8525-6064-806eea0ee86b@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mjambor@suse.cz \
    --cc=nd@arm.com \
    --cc=pmenzel+gcc.gnu.org@molgen.mpg.de \
    --cc=richard.guenther@gmail.com \
    --cc=sellcey@cavium.com \
    /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).