public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Stubbs, Andrew" <Andrew_Stubbs@mentor.com>
To: Richard Biener <rguenther@suse.de>,
	"Burnus, Tobias" <Tobias_Burnus@mentor.com>
Cc: "Yeung, Kwok" <Kwok_Yeung@mentor.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH] amdgcn: Add support for additional natively supported floating-point operations
Date: Fri, 9 Sep 2022 12:32:36 +0000	[thread overview]
Message-ID: <7a443bc59666477b8b57986cb8a3adf9@mentor.com> (raw)
In-Reply-To: <nycvar.YFH.7.77.849.2209091011440.20505@jbgna.fhfr.qr>

> -----Original Message-----
> I agree - for example powerpc has -mrecip= to control which instructions
> to use (float/double rsqrt or inverse) and -mrecip-precision to
> specify whether further iteration is done or not.
> 
> x86 has similar but does always perform newton raphson iteration,
> documenting 2 ulp instead of 0.5 ulp precision.
> 
> Your suggested huge reduction in precision isn't usually acceptable
> and should be always explicitely enabled.

There isn't a problem with *this* patch (although we do have existing accuracy issues thanks to previous documents lacking the information).

The "inaccurate" instructions are single-precision only, and therefore acceptable with -ffast-math.

Kwok intends to provide vectorized library calls for the double-precision and -fno-fast-math cases.

In general I want to avoid adding extra arch-specific options; partly because approximately no one will use them, and partly because the amdgcn compiler is almost always hidden behind an x86_64 compiler.

Andrew

  parent reply	other threads:[~2022-09-09 12:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 20:38 Kwok Cheung Yeung
2022-09-09  8:10 ` Andrew Stubbs
2022-09-09  9:15   ` Tobias Burnus
2022-09-09 10:16     ` Richard Biener
2022-09-09 12:20       ` GCN: Add -mlow-precision-sqrt for double-precision sqrt [PR105246] (was: Re: [PATCH] amdgcn: Add support for additional natively supported floating-point operations) Tobias Burnus
2022-09-09 12:40         ` Andrew Stubbs
2022-09-09 12:32       ` Stubbs, Andrew [this message]
2022-09-09 17:57 ` [PATCH] amdgcn: Add support for additional natively supported floating-point operations 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=7a443bc59666477b8b57986cb8a3adf9@mentor.com \
    --to=andrew_stubbs@mentor.com \
    --cc=Kwok_Yeung@mentor.com \
    --cc=Tobias_Burnus@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).