Compiler flags / Optimization for Raspberry Pi 3

Hi!

I just compiled a custom version of gr-osmosdr and had some performance issues with new hardware.
I ran the compilation process again with -Dhave_mfpu_neon=1 -DCMAKE_CXX_FLAGS:STRING="-Ofast -march=native -mfpu=neon-fp-armv8 -mfloat-abi=hard -funsafe-math-optimizations" -DCMAKE_C_FLAGS:STRING="-Ofast -march=native -mfpu=neon-fp-armv8 -mfloat-abi=hard -funsafe-math-optimizations" and saw performance improvements of around 30-40% less CPU load when running satnogs_fm_demod.py, which I’d say is very nice.

I’m now wondering if there are other libraries (especially GnuRadio?) which would benefit from being compiled with Raspberry Pi 3 / neon-armv8 Instructions.
I don’t think the GnuRadio-packages included in Debian/Raspbian uses these instructions, because the same packages are also used for the old ARMv6/RPi1 hardware.

Does anyone have a cross-compilation setup and could try building a more HW-specific version of GnuRadio?
I don’t really want to do that on the Pi, there are reports online stating that that takes over 48hours (poor SD card…)

Best regards,
Tobias

1 Like

hi @manawyrm

Much of the computation in GNU Radio uses the VOLK library to provide processor-optimized versions of many core number crunching.

It is typically an extra step for the system user that runs GR to run volk_profile. This process detects and selects the fastest implementations of the various functions. See https://wiki.gnuradio.org/index.php/Volk#Using_VOLK

I don’t recall if the Raspberry Pi image includes this optimization step.

it does not (that I can find today) but probably a good idea… @Acinonyx what do you think?