-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
thnets on Android #2
Comments
No. You have to give the right options to gcc, the best thing is to set up the Android.mk and Application.mk, so the NDK will set the proper options. In Android.mk I've added LOCAL_CFLAGS += -c -fopenmp -fPIC -DARM -D__NEON__ -mcpu=cortex-a9 -mfpu=neon -O3, in Application.mk add |
I am interested in that too, and am waiting for a concrete working example Thanks On 11-02-16 9:22 AM, yonadavs wrote:
|
@mvitez, thanks for the swift reply! |
As you prefer. |
Great! I'll try this now. |
I recently had some more time to invest on building Thnets for android, and I'm still unable to do it. |
The issue was with the redefinition of |
Excellent. I was about to start checking on Android now, good that you solved it. |
I'm now running into another problem calling (231 is the size from this example using this NN) I guess the net parameter is fine, as the init completed, and THLastError returns 0. |
I wouldn't know. sgemm_kernel_4x4_vfpv3.S reads from internal buffers and writes to the output buffer, all are allocated by thnets, so it appears to be some problem internal to thnets. I will try to compile it for Android by myself and see. |
I've tried now that network with a 231x231 image on a Nexus 5 and the test succeeded. But I've tried it from ssh in a pure C application. I've added some instructions at the end of the readme if you want to try in this way. |
Well, since my app is both Java and C, I tried making it work this way. I've put some time into it, but it still crashes mid |
I am sorry, but I don't know how I could help from here. I have tested this library on the devices that I have and this problem does not appear on my devices. |
I also have the same problem as yonadavs with sgemm_kernel. The app crashes with a signal 11. yonadavs, did you find the solution? |
Currently I don't have any evidence of this, but try to increase the buffer size in https://github.com/mvitez/thnets/blob/master/OpenBLAS-stripped/sgemm.c#L78, e.g. multiply it by 2 or 4. |
I have also meet this problem. happend at sgemm_kernel_4x4_vfpv3.S. |
after some investigation, I have found the program crash at spatialconvolutionMM when call kernal operation. |
Unfortunately I only have a Nexus 5 and it's there where I tested. And it does not crash there. |
@mvitez I have used the whole version of openblas build for android with USE_THREAD=0, it worked without crash |
Sure, of course, there is some problem in my integration of OpenBLAS. Have you tried my suggestion given in the comment of July 12th? And using the option -a 1? |
@mvitez I tried but still with option -a 2, I will try again. Thanks a lot. |
@mvitez yes, I used armeabi-v7a, since newer NDK complains armeabi-v7a-hard, thanks a lot. |
According to @culurciello, it should be easy to build this to run on Android.
Any document/example as to how it could be done? Could it be really as easy as setting
$CC
to my android gcc?Thanks.
The text was updated successfully, but these errors were encountered: