Re: [Discuss-gnuradio] ffast-math

2019-09-03 Thread Chris Kuethe
To be fair, I was running on a 1GHz Cortex-A8, that only had vfp3 (
https://en.wikipedia.org/wiki/CHIP_(computer)#CHIP). I fully expect that
you're going to need to spend some time going through all the different
compiler flags (-Ofast, -march, -mcpu, -mtune, -ffast-math,
-fthis-that-and-the-other) to figure out whether or not any knob makes the
program run faster on that particular board, makes it use more efficient
cpu instructions, or makes it produce (un)?acceptable solutions. Test
suites are awesome.

Re: dump1090, I ran my test with the mutability version and since then I've
switched to the flightaware fork since I run a few "piaware" sensors.

On Tue, Sep 3, 2019 at 9:59 AM Albin Stigö  wrote:

> In my experience VOLK runs about 10% faster on Raspberry Pi 4 with
> -ffast-math, depending on the flowgraph you might get more. Three
> kernels had some minor problems with precision, but I think they can
> be fixed so all will pass... The fun thing about these embedded
> platforms is that the possibilities for optimizations are almost
> endless!
>
> On a side note, which fork of dump1090 should I run? There seems to be so
> many!
>
>
> --Albin
>
> On Tue, Sep 3, 2019 at 6:18 PM Chris Kuethe 
> wrote:
> >
> > Yep, on some processors with some workloads it really makes a huge
> difference. As others have commented, there may be significant trade-offs
> with regard to numerical behaviro.
> >
> > Some of my observations:
> > dump1090 loses accuracy below the 7th digit when calculating precision,
> but consumes 10% less power on the device under test
> > rtl_433 runs about 35% faster
> > and acarsdec runs over 400% faster.
> >
> >
> > On Sun, Sep 1, 2019, 07:11 Albin Stigö  wrote:
> >>
> >> Anyone has experience with the real world impact of using gcc
> -ffast-math with SDR in general, and GNURadio/Volk in particular?
> >>
> >>
> >> --Albin SM6WJM
> >> ___
> >> Discuss-gnuradio mailing list
> >> Discuss-gnuradio@gnu.org
> >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>


-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] ffast-math

2019-09-03 Thread Albin Stigö
In my experience VOLK runs about 10% faster on Raspberry Pi 4 with
-ffast-math, depending on the flowgraph you might get more. Three
kernels had some minor problems with precision, but I think they can
be fixed so all will pass... The fun thing about these embedded
platforms is that the possibilities for optimizations are almost
endless!

On a side note, which fork of dump1090 should I run? There seems to be so many!


--Albin

On Tue, Sep 3, 2019 at 6:18 PM Chris Kuethe  wrote:
>
> Yep, on some processors with some workloads it really makes a huge 
> difference. As others have commented, there may be significant trade-offs 
> with regard to numerical behaviro.
>
> Some of my observations:
> dump1090 loses accuracy below the 7th digit when calculating precision, but 
> consumes 10% less power on the device under test
> rtl_433 runs about 35% faster
> and acarsdec runs over 400% faster.
>
>
> On Sun, Sep 1, 2019, 07:11 Albin Stigö  wrote:
>>
>> Anyone has experience with the real world impact of using gcc -ffast-math 
>> with SDR in general, and GNURadio/Volk in particular?
>>
>>
>> --Albin SM6WJM
>> ___
>> Discuss-gnuradio mailing list
>> Discuss-gnuradio@gnu.org
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] ffast-math

2019-09-03 Thread Chris Kuethe
Yep, on some processors with some workloads it really makes a huge
difference. As others have commented, there may be significant trade-offs
with regard to numerical behaviro.

Some of my observations:
dump1090 loses accuracy below the 7th digit when calculating precision, but
consumes 10% less power on the device under test
rtl_433 runs about 35% faster
and acarsdec runs over 400% faster.


On Sun, Sep 1, 2019, 07:11 Albin Stigö  wrote:

> Anyone has experience with the real world impact of using gcc -ffast-math
> with SDR in general, and GNURadio/Volk in particular?
>
>
> --Albin SM6WJM
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] ffast-math

2019-09-03 Thread Albin Stigö
Interesting! I'm experimenting with this right now. NEON on armv7 is
not always IEEE754 compliant by the way.

--Albin

On Mon, Sep 2, 2019 at 5:28 PM Müller, Marcus (CEL)  wrote:
>
> -ffast-math is allowed to reorder calculations, e.g. it can do
> a*f + b*f + c*f as (a+b+c)*f (or vice versa)
> which of course isn't necessarily the same result, and can lead to
> numerical instability.
>
> The problem is really that for some kernels, things like zero-signage
> and NaN / Inf handling / rounding / saturation are negligible, for
> others not. We've had plenty of fun with kernels where the SIMD
> implementation actually did the right thing, but the plain C
> implementation misbehaved, for example, because it didn't use the same
> FPU flags; I'd be kind of hesitant to add more "might or might not act
> as expected" code...
>
> Best regards,
> Marcus
>
> On Mon, 2019-09-02 at 16:52 +0200, Albin Stigö wrote:
> > ffast-math disables signed zero by design I think...
> >
> > I'm particularly interested in problems of numeric stability and loss of 
> > dynamic range.
> >
> >
> > --Albin
> >
> > On Mon, Sep 2, 2019, 15:27 Johannes Demel  wrote:
> > > Hi Albin,
> > >
> > > one of my students reported a little oddity about `-ffast-math`. Assume
> > > you want to set a float to -0, i.e. set the sign bit only. In this case
> > > `-ffast-math` seems to remove the sign bit.
> > >
> > > In VOLK this might be an issue with `_mm256_conjugate_ps` in
> > > `include/volk/volk_avx_intrinsics.h`. I didn't check for other potential
> > > error sources.
> > >
> > > Cheers
> > > Johannes
> > >
> > > Am 01.09.19 um 16:10 schrieb Albin Stigö:
> > > > Anyone has experience with the real world impact of using gcc
> > > > -ffast-math with SDR in general, and GNURadio/Volk in particular?
> > > >
> > > >
> > > > --Albin SM6WJM
> > > >
> > > > ___
> > > > Discuss-gnuradio mailing list
> > > > Discuss-gnuradio@gnu.org
> > > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> > > >
> > > ___
> > > Discuss-gnuradio mailing list
> > > Discuss-gnuradio@gnu.org
> > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] ffast-math

2019-09-02 Thread CEL
-ffast-math is allowed to reorder calculations, e.g. it can do
a*f + b*f + c*f as (a+b+c)*f (or vice versa)
which of course isn't necessarily the same result, and can lead to
numerical instability.

The problem is really that for some kernels, things like zero-signage
and NaN / Inf handling / rounding / saturation are negligible, for
others not. We've had plenty of fun with kernels where the SIMD
implementation actually did the right thing, but the plain C
implementation misbehaved, for example, because it didn't use the same
FPU flags; I'd be kind of hesitant to add more "might or might not act
as expected" code...

Best regards,
Marcus

On Mon, 2019-09-02 at 16:52 +0200, Albin Stigö wrote:
> ffast-math disables signed zero by design I think...
> 
> I'm particularly interested in problems of numeric stability and loss of 
> dynamic range.
> 
> 
> --Albin
> 
> On Mon, Sep 2, 2019, 15:27 Johannes Demel  wrote:
> > Hi Albin,
> > 
> > one of my students reported a little oddity about `-ffast-math`. Assume 
> > you want to set a float to -0, i.e. set the sign bit only. In this case 
> > `-ffast-math` seems to remove the sign bit.
> > 
> > In VOLK this might be an issue with `_mm256_conjugate_ps` in 
> > `include/volk/volk_avx_intrinsics.h`. I didn't check for other potential 
> > error sources.
> > 
> > Cheers
> > Johannes
> > 
> > Am 01.09.19 um 16:10 schrieb Albin Stigö:
> > > Anyone has experience with the real world impact of using gcc 
> > > -ffast-math with SDR in general, and GNURadio/Volk in particular?
> > > 
> > > 
> > > --Albin SM6WJM
> > > 
> > > ___
> > > Discuss-gnuradio mailing list
> > > Discuss-gnuradio@gnu.org
> > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> > > 
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


smime.p7s
Description: S/MIME cryptographic signature
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] ffast-math

2019-09-02 Thread Albin Stigö
ffast-math disables signed zero by design I think...

I'm particularly interested in problems of numeric stability and loss of
dynamic range.


--Albin

On Mon, Sep 2, 2019, 15:27 Johannes Demel  wrote:

> Hi Albin,
>
> one of my students reported a little oddity about `-ffast-math`. Assume
> you want to set a float to -0, i.e. set the sign bit only. In this case
> `-ffast-math` seems to remove the sign bit.
>
> In VOLK this might be an issue with `_mm256_conjugate_ps` in
> `include/volk/volk_avx_intrinsics.h`. I didn't check for other potential
> error sources.
>
> Cheers
> Johannes
>
> Am 01.09.19 um 16:10 schrieb Albin Stigö:
> > Anyone has experience with the real world impact of using gcc
> > -ffast-math with SDR in general, and GNURadio/Volk in particular?
> >
> >
> > --Albin SM6WJM
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] ffast-math

2019-09-02 Thread Johannes Demel
Hi Albin,

one of my students reported a little oddity about `-ffast-math`. Assume 
you want to set a float to -0, i.e. set the sign bit only. In this case 
`-ffast-math` seems to remove the sign bit.

In VOLK this might be an issue with `_mm256_conjugate_ps` in 
`include/volk/volk_avx_intrinsics.h`. I didn't check for other potential 
error sources.

Cheers
Johannes

Am 01.09.19 um 16:10 schrieb Albin Stigö:
> Anyone has experience with the real world impact of using gcc 
> -ffast-math with SDR in general, and GNURadio/Volk in particular?
> 
> 
> --Albin SM6WJM
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] ffast-math

2019-09-01 Thread Albin Stigö
Anyone has experience with the real world impact of using gcc -ffast-math
with SDR in general, and GNURadio/Volk in particular?


--Albin SM6WJM
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio