This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [AArch64] Remove AARCH64_EXTRA_TUNE_RECIP_SQRT from Cortex-A57 tuning


On 02/16/16 04:28, James Greenhalgh wrote:
On Mon, Feb 15, 2016 at 11:24:53AM -0600, Evandro Menezes wrote:
James,

There seem to be SPEC CPU2000fp validation issues on A57 when this
flag is present too.  Though I evaluated the algorithm with a huge
random set of values, always delivering accuracy around 1ulp, which
should be enough for CPU2000fp (wit x86-64), I expected the
benchmarks to pass.

My suspicion is that the Newton series on AArch64 is probably good
only for SP.  Then, DP might require an extra round, probably
exacerbating the performance penalty.

I'd like to try to split this tuning option into one for SP and
another for DP.  Thoughts?
I haven't seen validation issues with the default expansion, but with
-mlow-precision-recip-sqrt I do see failures. I think this is to be
expected. I don't support splitting the low-precision flag to
"-mlow-precision-float-recip-sqrt" and "-mlow-precision-double-recip-sqrt",
I think that is pushing a particular set of Spec tuning flags over any
meaningful use case.

I could imagine a case for splitting the internal tuning flag to give
AARCH64_EXTRA_TUNE_SF_RECIP_SQRT and AARCH64_EXTRA_TUNE_DF_RECIP_SQRT, but
I'm not sure I understand the benefits of this? Certainly, I think your goals
for performance (turn on for 64-bit divide/sqrt) would contradict your goals
for accuracy (turn off for 64-bit divide/sqrt).

I'm happy with these flags as they are, but I might be missing a subtelty in
your argument?

James,

I'm still in sorting out the data, but, indeed, I see no validation issues with the approximate reciprocal square root in CPU2000.

However, working on a patch to use the Newton series for square root based on the approximate reciprocal square root (d^1/2 = d * d^-1/2), I stumbled at validation errors. I'll take the discussion to that thread.

Stand by...

--
Evandro Menezes


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