helm getting ARM support!

Requested forum for discussing ARM Hardware other than the PI/PI2

Moderators: khz, MattKingUSA

User avatar
danboid
Establlshed Member
Posts: 1301
Joined: Sun Aug 26, 2012 11:28 am
Location: England

helm getting ARM support!

Postby danboid » Sat Feb 27, 2016 5:49 pm

Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

User avatar
sysrqer
Establlshed Member
Posts: 1409
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: helm getting ARM support!

Postby sysrqer » Sat Feb 27, 2016 7:34 pm

Well that's good news but it doesn't seem to be such a definite statement from reading that thread :P

User avatar
danboid
Establlshed Member
Posts: 1301
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: helm getting ARM support!

Postby danboid » Sun Feb 28, 2016 1:35 pm

Check it again. Matt has a Beaglebone Black and is going to try getting Helm running on it!

:)
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

User avatar
falkTX
Establlshed Member
Posts: 6587
Joined: Sat Jan 09, 2010 3:04 pm

Re: helm getting ARM support!

Postby falkTX » Sun Feb 28, 2016 2:36 pm

hmm, how hard is it really?
juce works fine in ARM, and even has neon optimizations. it's been like this for a while now.

if you just remove the intel specific build flags (SSE, mtune, etc) then you should be able to build it "as-is".

User avatar
danboid
Establlshed Member
Posts: 1301
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: helm getting ARM support!

Postby danboid » Mon Feb 29, 2016 12:55 am

I've updated the GH issue now as I've got Helm to build and run on my BPi but its not really usable as it xruns all over the place even with just one instance using the default patch.

I'm hoping Matt will add NEON support to helm to make it usable on ARM machines.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

User avatar
tramp
Establlshed Member
Posts: 1153
Joined: Mon Jul 01, 2013 8:13 am

Re: helm getting ARM support!

Postby tramp » Mon Feb 29, 2016 4:39 am

danboid wrote:I'm hoping Matt will add NEON support to helm to make it usable on ARM machines.


You can do that by yourself, as falktx pointed out, that are just compile flags.

run cat /proc/cpuinfo to see which flags be supported on your ARM maschine, then use them.

here is a example:

Code: Select all

cat /proc/cpuinfo
...
model name   : ARMv7 Processor rev 5 (v7l)
...
Features   : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
...


flags to use:

Code: Select all

-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -fomit-frame-pointer -ftree-loop-linear -ffinite-math-only -fno-math-errno -fno-signed-zeros -fstrength-reduce -pipe

User avatar
falkTX
Establlshed Member
Posts: 6587
Joined: Sat Jan 09, 2010 3:04 pm

Re: helm getting ARM support!

Postby falkTX » Mon Feb 29, 2016 1:03 pm

the raspberry2 CPU is the same as MOD so you can use the same flags we do:

Code: Select all

-O3 -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mvectorize-with-neon-quad -ffast-math -fno-finite-math-only -fprefetch-loop-arrays -funroll-loops -funsafe-loop-optimizations


Some of those flags are a bit 'unsafe'. There's still some final verification and tuning to do there, but for the most part they work fine.

@tramp:
I see you don't have -ffast-math in there, why is that?
Without -ffast-math the NEON optimizations won't be enabled.
"-fomit-frame-pointer" and "-fstrength-reduce" are auto-enabled for >= -O2.
"-ffinite-math-only -fno-math-errno -fno-signed-zeros" are all part of -ffast-math.

-ftree-loop-linear is new to me, did you do some testing with that?

User avatar
tramp
Establlshed Member
Posts: 1153
Joined: Mon Jul 01, 2013 8:13 am

Re: helm getting ARM support!

Postby tramp » Mon Feb 29, 2016 2:42 pm

Well, I'm didn't use them by myself, no ARM devices here (except the MOD Quadra). This flags been suggested by Autostatic in the guitarix forum for running guitarix on the RPI2.
falkTX wrote:-ftree-loop-linear is new to me, did you do some testing with that?


Yes, we use it in guitarix as default optimization flag.

gcc-4.4.1 wrote:-ftree-loop-linear
Perform linear loop transformations on tree. This flag can improve cache performance and allow further loop optimizations to take place.


gcc-5.2.0 wrote:-ftree-loop-linear
Perform loop interchange transformations on tree. Same as -floop-interchange. To use this code transformation, GCC has to be configured with --with-isl to enable the Graphite loop transformation infrastructure.

User avatar
danboid
Establlshed Member
Posts: 1301
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: helm getting ARM support!

Postby danboid » Mon Feb 29, 2016 3:55 pm

Thanks for your suggestions F and tramp!

F:

I'm using a Banana Pi not an RPi 2. Your flags should still apply as its basically the same CPU albeit dual instead of quad core and 1 Ghz instead of 900 Mhz.

Both:

I'll try your recommendations and see how much it improves things although I would imagine there is quite a lot more that could be done to properly optimize Helm for ARM. I grepped the source for sse2 and there is a fair bit of sse2-specific code. This would surely have to be rewritten for NEON to get the best performance.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

User avatar
danboid
Establlshed Member
Posts: 1301
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: helm getting ARM support!

Postby danboid » Mon Feb 29, 2016 4:25 pm

Maybe I spoke too soon!

I've just had another look at the source and all the SSE2 stuff is within JUCE with the exception of mopo/src/utils.h but I'm not sure what that does.

With any luck Matt will find some way to increase performance for ARM devices beyond just changing build flags.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

User avatar
danboid
Establlshed Member
Posts: 1301
Joined: Sun Aug 26, 2012 11:28 am
Location: England

Re: helm getting ARM support!

Postby danboid » Tue Mar 01, 2016 1:36 am

I rebuilt Helm tonight using all of the flags F recommended plus -ftree-loop-linear but Helm ran a lot worse than using the default flags. It takes just under 2 hours to build Helm and the included JUCE tree on my BPi so I think I'll wait to see what Matt comes up with before I try again.

I'm disappointed the RPi 3 still only has a 100Mb NIC and no SATA or USB 3. The faster, 64 bit CPU is nice but the lack of decent storage IO means I still prefer my BPi. It makes a massive difference for usability and responsiveness running off a SATA HD or SSD vs an SD card or USB 2 HD that is sharing the same bus as the NIC and the other USB devices.
Last edited by danboid on Tue Mar 01, 2016 7:46 am, edited 1 time in total.
Are you new to Linux Audio? This manual explains how to install KXStudio, set up and use JACK, mimimize latency, lists the best Linux AV apps and much more all in a concise and easy to understand format.

http://wiki.linuxaudio.org/wiki/kxstudio_manual

User avatar
tramp
Establlshed Member
Posts: 1153
Joined: Mon Jul 01, 2013 8:13 am

Re: helm getting ARM support!

Postby tramp » Tue Mar 01, 2016 4:08 am

falkTX wrote:@tramp:
I see you don't have -ffast-math in there, why is that?


@falkTX

I forgot to answer, well , -ffast-math gime wrong calculated float values in the old day's, That's why I didn't use it any more and use only selected flags from the list which -ffast-math activate. I didn't know if that behave is fixed with newer compilers, but I guess it is.


Return to “Other ARM Hardware / Software”

Who is online

Users browsing this forum: No registered users and 1 guest