-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[MXNET-57] Added support android64 #11055
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,41 +173,67 @@ build_arm64() { | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
| -DUSE_CUDA=OFF\ | ||
| -DSUPPORT_F16C=OFF\ | ||
| -DUSE_OPENCV=OFF\ | ||
| -DUSE_OPENMP=OFF\ | ||
| -DUSE_SIGNAL_HANDLER=ON\ | ||
| -DCMAKE_BUILD_TYPE=RelWithDebInfo\ | ||
| -DUSE_MKL_IF_AVAILABLE=OFF\ | ||
| -G Ninja /work/mxnet | ||
| ninja | ||
| ninja -v | ||
| export MXNET_LIBRARY_PATH=`pwd`/libmxnet.so | ||
| cd /work/mxnet/python | ||
| python setup.py bdist_wheel --universal | ||
| cp dist/*.whl /work/build | ||
| } | ||
|
|
||
| build_android_arm64() { | ||
| build_android_armv7() { | ||
| set -ex | ||
| cd /work/build | ||
| cmake \ | ||
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
| -DUSE_CUDA=OFF\ | ||
| -DUSE_SSE=OFF\ | ||
| -DSUPPORT_F16C=OFF\ | ||
| -DUSE_LAPACK=OFF\ | ||
| -DUSE_OPENCV=OFF\ | ||
| -DUSE_OPENMP=OFF\ | ||
| -DUSE_SIGNAL_HANDLER=ON\ | ||
| -DCMAKE_BUILD_TYPE=RelWithDebInfo\ | ||
| -DUSE_MKL_IF_AVAILABLE=OFF\ | ||
| -G Ninja /work/mxnet | ||
| ninja | ||
| ninja -v | ||
| export MXNET_LIBRARY_PATH=`pwd`/libmxnet.so | ||
| cd /work/mxnet/python | ||
| python setup.py bdist_wheel --universal | ||
| cp dist/*.whl /work/build | ||
| } | ||
|
|
||
| build_android_arm64() { | ||
| set -ex | ||
| cd /work/build | ||
| # There are other ways for CMake to cross compile android, like setting the following variables | ||
| # below. But right not it doesn't work as expected, we need to find what's the best strategy to | ||
| # build with CMake in Android. | ||
| # -DCMAKE_ANDROID_NDK=${CROSS_ROOT} \ | ||
| # -DCMAKE_SYSTEM_VERSION=${ANDROID_NDK_REVISION} \ | ||
| # -DCMAKE_SYSTEM_NAME=Android \ | ||
| # | ||
| cmake\ | ||
| -DANDROID=ON \ | ||
| -DUSE_CUDA=OFF\ | ||
| -DUSE_SSE=OFF\ | ||
| -DUSE_LAPACK=OFF\ | ||
| -DUSE_OPENCV=OFF\ | ||
| -DUSE_OPENMP=OFF\ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No open mp? Android phones usually have around 4 to 8 cores, so we should have it enabled
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an initial build, what you are saying doesn't apply. Nobody should test this. |
||
| -DUSE_SIGNAL_HANDLER=ON\ | ||
| -DCMAKE_BUILD_TYPE=RelWithDebInfo\ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To reduce the size, I'd propose we build without debug info for now
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want symbols to diagnose initial runs and crashes, there's a reason for this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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_MKL_IF_AVAILABLE=OFF\ | ||
| -G Ninja /work/mxnet | ||
| ninja -v | ||
| } | ||
|
|
||
| build_centos7_cpu() { | ||
| set -ex | ||
| cd /work/mxnet | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does ARM/android support F16C instruction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work also for cross compilation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give thumbs up or down to the review? Any more comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, here you go)