Registered Member
|
Hi,
I having problems porting some applications that use Eigen to Android when I activate neon instructions. I have seen that this bug http://eigen.tuxfamily.org/bz/show_bug.cgi?id=313 is still open and I do not know if it is related. The thing is that running the eigen test (3.0.1 version) in linux (Ubuntu 10.10) in the same ARM device (http://pandaboard.org/) but using the the same gcc flags I am using for Android compilation in the ndk, some of the tests fail. For instance compiling the test "triangular_4" with the next command :
and this
It runs smoothly but if I add the flag "-mfpu=neon" to both gcc invocations the test fails as follows :
I have seen some other tests failing with these flags (including "-mfpu=neon"), the previous one is one of those. Could you give a hand with this issue. |
Moderator
|
hi, sorry for the late reply. Could you be more specific about the version of gcc. As far as I remember all tests passed on an ARM NEON with Eigen 3.0.1. I'll try again triangular_4. Do you remember which other tests failed?
|
Registered Member
|
Hi,
The compiler version is the following one
Actually last time I got lucky. The are more test failing in android than in Linux over the same device but I tested just "triangular_4" in Linux that failed and I assumed that the same tests were failling in both platforms. The other ones than fail are ./redux_4:
and ... well schur_complex_2 is not even compiling
But I guess that is not on your side . If you want I can give the full list of android failing test. But in order to reproduce I cross compiled the files with ndk and the run the test using adb (the procedure is long to explain here). It seems I am pushing gcc limits here. |
Registered Member
|
Has anyone tried to activate neon support in Android with Eigen? If I use "-mfpu=vfpv3" everything works smoothly. But if use -mfpu=neon the results goes crazy, it compiles but my application results are not right. I am using cmake (http://code.google.com/p/android-cmake/) to compile eigen with android ndk. My previous post were trying to focus in a specific problem. But it seems none had an answer or I did not explain myself right so if anyone has solved a similar problem please let me know. I have googled the issue but with no success.
|
Registered Member
|
Hi all, I filed the other bug mentioned and am still interested in finding out what's going wrong - haven't made any progress so far. Coincidentally, I am going to receive a Pandaboard next week and will be able to run a few tests on it or provide assembly output. Might be also worthwhile to change the NDK toolchain to a later GCC, but it seems that might be taking some amount of effort.
|
Registered Member
|
Hi kmhofmann,
Did you successfully run any test in your new pandaboard either in Linux or in Android. If you need any help doing so please let me know. I would be great to have another user feedback to see if I am doing something wrong. |
Registered Member
|
Hi,
I have just done your tests on the Pandaboard. I'm compiling on the device using Ubuntu 11.10 with > g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 Both "triangular_4" as well as "schur_complex_2" have passed the test both with and without "mfpu=neon" enabled. Therefore I suspect that the errors that we are seeing on Android are due to an outdated toolchain in the NDK releases. I am still building the complete Eigen test suite on the Pandaboard, which will take some time. In case there are any errors, I will let you know. Slightly off-topic: There are attempts by others to provide custom-built NDK toolchains based on newer versions of gcc, binutils, etc. I am aware of this effort: http://groups.google.com/group/android- ... f6f0bbc9d# That said, I have tried to build my own software (which itself also contains both NEON assembly as well as intrinsics code) with it and got immediate crashes that I couldn't explain. And building my own toolchain seems a bit too time-consuming at the moment. Cheers, Michael |
Registered Member
|
For Android development, have a look at the new version of the Crystax NDK: http://www.crystax.net/en/android/ndk/7
This is the first custom NDK that managed to compile my code using Eigen and NEON vectorization without any apparent issues at compile or run-time, due to its GCC 4.6.3 toolchain. The errors that I had been seeing have been almost certainly been compiler issues of previous versions of GCC. |
Registered Member
|
Thanks Michael for your answers and feedback,
I will test it as soon as I have time an I will let you know. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]