[Mesa-dev] [PATCH] nir: Optimize double-precision lower_round_even()

Matt Turner mattst88 at gmail.com
Mon Jan 28 18:32:49 UTC 2019


On Mon, Jan 28, 2019 at 10:25 AM Roland Scheidegger <sroland at vmware.com> wrote:
>
> I like it :-).
> That said, there's some caveats as discussed on IRC - in particular for
> gpus which don't do round-to-nearest-even for ordinary fp64 math (or
> rounding mode could be set to something else manually) it won't do the
> right thing.

I don't know that there are any. Round-to-even is the simplest thing
to do in hardware.

> And if you can have fast-math enabled, then it probably won't round at
> all (at least I think it would be legal to eliminate the add/sub in this
> case).
> So I'm not entirely sure anymore if this can be used unconditionally.
> But I can't really tell if those potential caveats actually matter, hence
> Reviewed-by: Roland Scheidegger <sroland at vmware.com>


Thanks!


More information about the mesa-dev mailing list