-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[android][scripts] Script for full android build to aars; script to run android tests #26833
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
Conversation
60810d0 to
32e459f
Compare
32e459f to
d4bfe80
Compare
d4bfe80 to
e7c8a0c
Compare
| @@ -0,0 +1,96 @@ | |||
| #!/bin/bash | |||
| set -eux | |||
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.
nit: the name of the script is a bit verbose - can we simple call it "build_pytorch_android.sh"?
you can put a comment here to describe what it does.
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.
done
4590e78 to
ab68715
Compare
ab68715 to
b8154df
Compare
facebook-github-bot
left a comment
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.
@IvanKobzarev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@IvanKobzarev merged this pull request in 47cd15c. |
…ytorch#26833) Summary: 1. scripts/build_android_libtorch_and_pytorch_android.sh - Builds libtorch for android_abis (by default for all 4: x86, x86_64, armeabi-v7a, arm-v8a) but cab be specified only custom list as a first parameter e.g. "x86" - Creates symbolic links inside android/pytorch_android to results of the previous builds: `pytorch_android/src/main/jniLibs/${abi}` -> `build_android/install/lib` `pytorch_android/src/main/cpp/libtorch_include/${abi}` -> `build_android/install/include` - Runs gradle assembleRelease to build aar files proxy can be specified inside (for devservers) 2. android/run_tests.sh Running pytorch_android tests, contains instruction how to setup and run android emulator in headless and noaudio mode to run it on devserver proxy can be specified inside (for devservers) #Test plan Scenario to build x86 libtorch and android aars with it and run tests: ``` cd pytorch sh scripts/build_android_libtorch_and_pytorch_android.sh x86 sh android/run_tests.sh ``` Tested on my devserver - build works, tests passed Pull Request resolved: pytorch#26833 Differential Revision: D17673972 Pulled By: IvanKobzarev fbshipit-source-id: 8cb7c3d131781854589de6428a7557c1ba7471e9
…ytorch#26833) Summary: 1. scripts/build_android_libtorch_and_pytorch_android.sh - Builds libtorch for android_abis (by default for all 4: x86, x86_64, armeabi-v7a, arm-v8a) but cab be specified only custom list as a first parameter e.g. "x86" - Creates symbolic links inside android/pytorch_android to results of the previous builds: `pytorch_android/src/main/jniLibs/${abi}` -> `build_android/install/lib` `pytorch_android/src/main/cpp/libtorch_include/${abi}` -> `build_android/install/include` - Runs gradle assembleRelease to build aar files proxy can be specified inside (for devservers) 2. android/run_tests.sh Running pytorch_android tests, contains instruction how to setup and run android emulator in headless and noaudio mode to run it on devserver proxy can be specified inside (for devservers) #Test plan Scenario to build x86 libtorch and android aars with it and run tests: ``` cd pytorch sh scripts/build_android_libtorch_and_pytorch_android.sh x86 sh android/run_tests.sh ``` Tested on my devserver - build works, tests passed Pull Request resolved: pytorch#26833 Differential Revision: D17673972 Pulled By: IvanKobzarev fbshipit-source-id: 8cb7c3d131781854589de6428a7557c1ba7471e9
Builds libtorch for android_abis (by default for all 4: x86, x86_64, armeabi-v7a, arm-v8a) but cab be specified only custom list as a first parameter e.g. "x86"
Creates symbolic links inside android/pytorch_android to results of the previous builds:
pytorch_android/src/main/jniLibs/${abi}->build_android/install/libpytorch_android/src/main/cpp/libtorch_include/${abi}->build_android/install/includeRuns gradle assembleRelease to build aar files
proxy can be specified inside (for devservers)
Running pytorch_android tests, contains instruction how to setup and run android emulator in headless and noaudio mode to run it on devserver
proxy can be specified inside (for devservers)
#Test plan
Scenario to build x86 libtorch and android aars with it and run tests:
Tested on my devserver - build works, tests passed