File tree Expand file tree Collapse file tree 7 files changed +17
-16
lines changed
src/main/java/org/pytorch Expand file tree Collapse file tree 7 files changed +17
-16
lines changed Original file line number Diff line number Diff line change @@ -97,13 +97,13 @@ def gen_tree(self):
97
97
is_master_only = False ,
98
98
is_pr_only = True ),
99
99
AndroidGradleJob (
100
- "pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single_lite_interpreter " ,
100
+ "pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single-full-jit " ,
101
101
"pytorch_android_gradle_custom_build_single" ,
102
102
[DOCKER_REQUIREMENT_NDK ],
103
103
is_master_only = False ,
104
104
is_pr_only = True ,
105
105
extra_props = tuple ({
106
- "lite_interpreter" : miniutils .quote (str (int (True )))
106
+ "lite_interpreter" : miniutils .quote (str (int (False )))
107
107
}.items ())),
108
108
AndroidGradleJob (
109
109
"pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-build" ,
Original file line number Diff line number Diff line change @@ -6534,8 +6534,8 @@ workflows:
6534
6534
only :
6535
6535
- /gh\/.*\/head/
6536
6536
- /pull\/.*/
6537
- lite_interpreter : " 1 "
6538
- name : pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single_lite_interpreter
6537
+ lite_interpreter : " 0 "
6538
+ name : pytorch-linux-xenial-py3-clang5-android-ndk-r19c-gradle-custom-build-single-full-jit
6539
6539
requires :
6540
6540
- docker-pytorch-linux-xenial-py3-clang5-android-ndk-r19c
6541
6541
- pytorch_android_gradle_build :
Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.4.1)
2
- option (BUILD_LITE_INTERPRETER "Master flag to build pytorch_jni_lite" OFF )
2
+ option (BUILD_LITE_INTERPRETER "Master flag to build pytorch_jni_lite" ON )
3
3
message (
4
4
STATUS
5
5
"BUILD_LITE_INTERPRETER (pytorch_jni_lite): ${BUILD_LITE_INTERPRETER} " )
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ android {
17
17
}
18
18
externalNativeBuild {
19
19
cmake {
20
- if (System . env. BUILD_LITE_INTERPRETER == ' 1 ' ) {
21
- arguments " -DANDROID_STL=c++_shared" , " -DBUILD_LITE_INTERPRETER=ON "
20
+ if (System . env. BUILD_LITE_INTERPRETER == ' 0 ' ) {
21
+ arguments " -DANDROID_STL=c++_shared" , " -DBUILD_LITE_INTERPRETER=OFF "
22
22
} else {
23
23
arguments " -DANDROID_STL=c++_shared"
24
24
}
@@ -37,12 +37,12 @@ android {
37
37
sourceSets {
38
38
main {
39
39
java {
40
- if (System . env. BUILD_LITE_INTERPRETER == ' 1' ) {
41
- println ' Build pytorch_jni_lite'
42
- } else {
40
+ if (System . env. BUILD_LITE_INTERPRETER == ' 0' ) {
43
41
println ' Build pytorch_jni'
44
42
exclude ' org/pytorch/LiteModuleLoader.java'
45
43
exclude ' org/pytorch/LiteNativePeer.java'
44
+ } else {
45
+ println ' Build pytorch_jni_lite'
46
46
}
47
47
}
48
48
jniLibs. srcDirs = [' src/main/jniLibs' ]
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public final class PyTorchAndroid {
10
10
if (!NativeLoader .isInitialized ()) {
11
11
NativeLoader .init (new SystemDelegate ());
12
12
}
13
- NativeLoader .loadLibrary ("pytorch_jni " );
13
+ NativeLoader .loadLibrary ("pytorch_jni_lite " );
14
14
PyTorchCodegenLoader .loadNativeLibs ();
15
15
}
16
16
Original file line number Diff line number Diff line change 104
104
CMAKE_ARGS+=(" -DBUILD_TEST=OFF" )
105
105
CMAKE_ARGS+=(" -DBUILD_BINARY=OFF" )
106
106
107
- # If there exists env variable and it equals to 1, build lite interpreter.
108
- # cmd: BUILD_LITE_INTERPRETER=1 ./scripts/build_android.sh
109
- if [ " ${BUILD_LITE_INTERPRETER} " == 1 ]; then
110
- CMAKE_ARGS+=(" -DBUILD_LITE_INTERPRETER=ON" )
111
- else
107
+ # If there exists env variable and it equals to 0, build full jit interpreter.
108
+ # Default behavior is to build lite interpreter
109
+ # cmd: BUILD_LITE_INTERPRETER=0 ./scripts/build_android.sh
110
+ if [ " ${BUILD_LITE_INTERPRETER} " == 0 ]; then
112
111
CMAKE_ARGS+=(" -DBUILD_LITE_INTERPRETER=OFF" )
112
+ else
113
+ CMAKE_ARGS+=(" -DBUILD_LITE_INTERPRETER=ON" )
113
114
fi
114
115
CMAKE_ARGS+=(" -DBUILD_MOBILE_BENCHMARK=$BUILD_MOBILE_BENCHMARK " )
115
116
CMAKE_ARGS+=(" -DBUILD_MOBILE_TEST=$BUILD_MOBILE_TEST " )
You can’t perform that action at this time.
0 commit comments