-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
how to improve the speed of network:forward #68
Comments
This must be the reason |
Yes, I can confirm this. When I compile OpenBlas for Android-Torch, it becomes much more faster than before. But it only works on the version of ARM64. Because OpenBlas only supports hard-float for ARMV7. |
Hi ExenVitor, care to write more detailed instructions on how to compile torch-android with OpenBlas? Thanks! |
Let me leaborate, I'm building for ARM64 (ARCH=${ARCH:-"v8"}) and linking OpenBLAS library /opt/OpenBLAS/lib/libopenblas.a I get this error: /opt/OpenBLAS/lib/libopenblas.a: error adding symbols: File in wrong format OpenBlas compiled using this command: make TARGET=ARMV8 BINARY=64 HOSTCC=gcc CC=aarch64-linux-android-gcc NOFORTRAN=1 USE_OPENMP=1 |
@antoniosimunovic Sorry for the late reply. It looks like you are linking System's OpenBLAS library. You need install the |
Thanks, that is the solution! I've put the install script before the make command in build.sh. |
check notfound
|
Thanks @ExenVitor for your excellent contribution |
I am using cpu only,and it takes about 4500ms to using the function network:forward to process an image(96x96).
how to use OpenMP or OpenCL to improve the speed?
And it is very strange that I use torch.setnumthreads(1) is much more faster than torch.setnumthreads(4)
The text was updated successfully, but these errors were encountered: