[MXNET-57] Added support android64 #11055
Conversation
9f6e8f9 to
4dfd6d4
Compare
c8d943f to
05ef1df
Compare
|
@marcoabreu @szha @piiswrong please merge |
| -DUSE_OPENCV=OFF\ | ||
| -DUSE_OPENMP=OFF\ | ||
| -DUSE_SIGNAL_HANDLER=ON\ | ||
| -DCMAKE_BUILD_TYPE=RelWithDebInfo\ |
There was a problem hiding this comment.
To reduce the size, I'd propose we build without debug info for now
There was a problem hiding this comment.
I want symbols to diagnose initial runs and crashes, there's a reason for this.
There was a problem hiding this comment.
I'd propose that you set that flag locally then. We're referencing these instructions in our guides and to our customers, means we have to provide a ready-made solution. We had the same case previously when a customer complained about the size and in fact it was only the RelWithDebInfo.
There was a problem hiding this comment.
I don't see how the points you are making about an experimental build which is not official nor tested are of any relevance at this stage of Android support. This is a development build and I want debug symbols to diagnose crashes, this should be reason enough to have it as it is, because size of build doesn't really matter right now, and debugability is more important.
There was a problem hiding this comment.
We already spoke about this offline and I said that I'm fine with moving forward. Before you explaining it to me, I was under the impression that this would be the final stage.
| -DUSE_SSE=OFF\ | ||
| -DUSE_LAPACK=OFF\ | ||
| -DUSE_OPENCV=OFF\ | ||
| -DUSE_OPENMP=OFF\ |
There was a problem hiding this comment.
No open mp? Android phones usually have around 4 to 8 cores, so we should have it enabled
There was a problem hiding this comment.
first we make a baseline version run, don't propose to overcomplicate things. Feel free to work on making openmp work in android to use all your cores if you have time.
There was a problem hiding this comment.
Well we want to make a good first impression if people use it. If everything is slow the first time they test it, they most likely will not come back. OpenMP is very important, especially since we don't have any other hardware acceleration. Until that works, we can't really tell any customer to use it or we will lose creditability.
There was a problem hiding this comment.
This is an initial build, what you are saying doesn't apply. Nobody should test this.
| export MXNET_LIBRARY_PATH=`pwd`/libmxnet.so | ||
| #cd /work/mxnet/python | ||
| #python setup.py bdist_wheel --universal | ||
| #cp dist/*.whl /work/build |
There was a problem hiding this comment.
there will be more work to build a binary so these comments will go away, having another run of CI will take many hours and with flaky tests potentially days. I would suggest to merge this as it is.
There was a problem hiding this comment.
Removed commented out code and added comments on flags that need further investigation
There was a problem hiding this comment.
"CI will take many hours and with flaky tests potentially days" is not a valid reason.
Thank you.
| mxnet_option(USE_CUDNN "Build with cudnn support" ON) # one could set CUDNN_ROOT for search path | ||
| mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON) | ||
| mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON IF NOT ARM) | ||
| mxnet_option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects support if ON |
There was a problem hiding this comment.
does ARM/android support F16C instruction?
There was a problem hiding this comment.
AFAIK F16C is x86, so maybe only in android x86 but most android is ARM, and this is an ARM build ATM. We should add x86 android builds in the future, good point.
There was a problem hiding this comment.
We should do an automatic scan in the future if the feature is present on the system and the compiler like for F16 in this PR.
There was a problem hiding this comment.
Does this work also for cross compilation?
There was a problem hiding this comment.
Can you give thumbs up or down to the review? Any more comments?
| mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON) | ||
| mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON IF NOT ARM) | ||
| mxnet_option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects support if ON | ||
| mxnet_option(USE_LAPACK "Build with lapack support" ON IF NOT MSVC) |
There was a problem hiding this comment.
this logic is buggy, so tries to always use LAPACK, and if I recall correctly is not available atm in android. See also: #11094
10a6af5 to
a74fb07
Compare
| mxnet_option(USE_CUDNN "Build with cudnn support" ON) # one could set CUDNN_ROOT for search path | ||
| mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON) | ||
| mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON IF NOT ARM) | ||
| mxnet_option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects support if ON |
There was a problem hiding this comment.
Does this work also for cross compilation?
| #COPY install/ubuntu_ccache.sh /work/ | ||
| #RUN /work/ubuntu_ccache.sh | ||
|
|
||
| FROM dockcross/base:latest |
There was a problem hiding this comment.
Why not use dockcross/android-arm64 ?
There was a problem hiding this comment.
Happy to do so in a subsequent PR, now this one passed. I would very much like to get it merged so at least we have this build as a gatekeeping mechanism.
|
@marcoabreu @piiswrong @szha please merge |
| #COPY install/ubuntu_core.sh /work/ | ||
| #RUN /work/ubuntu_core.sh | ||
| #COPY install/ubuntu_ccache.sh /work/ | ||
| #RUN /work/ubuntu_ccache.sh |
There was a problem hiding this comment.
Let's get the ARMv7 PR merged first and then I ammend this one and re-enable the ccache logic.
marcoabreu
left a comment
There was a problem hiding this comment.
LGTM besides the ccache removal
* Fixes sources for android64 Add initial android64 build logic. Remove pthread when linking MXNet in Android. Bionic provides built-in support for threads. * Simplify and fix android64 build
|
CI is giving problems when downloading CUDA? This is an adversarial environment to get code merged. |
* Fixes sources for android64 Add initial android64 build logic. Remove pthread when linking MXNet in Android. Bionic provides built-in support for threads. * Simplify and fix android64 build
* Fixes sources for android64 Add initial android64 build logic. Remove pthread when linking MXNet in Android. Bionic provides built-in support for threads. * Simplify and fix android64 build
Description
Fixes for Android64
Added Android64 to CI
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.