mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert D27469727: [pytorch][PR] [android] fbjni from prefab dependency 0.2.2
Test Plan: revert-hammer
Differential Revision:
D27469727 (507b46f23e
)
Original commit changeset: 2ab22879e81c
fbshipit-source-id: d656463b81a02fbf870dded5d3868bb33e016fe0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c85d3f501f
commit
eb52e36460
@ -51,8 +51,7 @@ android {
|
||||
dependencies {
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||||
implementation 'com.facebook.fbjni:fbjni-java-only:0.2.2'
|
||||
implementation 'com.facebook.fbjni:fbjni:0.2.2'
|
||||
implementation 'com.facebook.fbjni:fbjni-java-only:0.0.3'
|
||||
implementation 'com.google.code.findbugs:jsr305:3.0.1'
|
||||
implementation 'com.facebook.soloader:nativeloader:0.8.0'
|
||||
|
||||
|
@ -13,8 +13,8 @@ allprojects {
|
||||
junitVersion = "4.12"
|
||||
|
||||
androidSupportAppCompatV7Version = "28.0.0"
|
||||
fbjniVersion = "0.2.2"
|
||||
soLoaderNativeLoaderVersion = "0.10.1"
|
||||
fbjniJavaOnlyVersion = "0.0.3"
|
||||
soLoaderNativeLoaderVersion = "0.8.0"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
Submodule android/libs/fbjni updated: a031656b52...b592c55913
@ -86,6 +86,10 @@ target_compile_options(${PYTORCH_JNI_TARGET} PRIVATE
|
||||
target_include_directories(${PYTORCH_JNI_TARGET} BEFORE
|
||||
PUBLIC $<BUILD_INTERFACE:${libtorch_include_DIR}>)
|
||||
|
||||
set(fbjni_DIR ${CMAKE_CURRENT_LIST_DIR}/../libs/fbjni/)
|
||||
set(fbjni_BUILD_DIR ${CMAKE_BINARY_DIR}/fbjni/${BUILD_SUBDIR})
|
||||
|
||||
add_subdirectory(${fbjni_DIR} ${fbjni_BUILD_DIR})
|
||||
|
||||
# ---[ Vulkan deps
|
||||
if(USE_VULKAN)
|
||||
@ -95,9 +99,6 @@ if(USE_VULKAN)
|
||||
endif()
|
||||
|
||||
if(ANDROID_ABI)
|
||||
set(build_DIR ${CMAKE_SOURCE_DIR}/build)
|
||||
find_package(fbjni REQUIRED CONFIG)
|
||||
|
||||
function(import_static_lib name)
|
||||
add_library(${name} STATIC IMPORTED)
|
||||
set_property(
|
||||
@ -119,7 +120,7 @@ if(ANDROID_ABI)
|
||||
|
||||
# Link most things statically on Android.
|
||||
set(pytorch_jni_LIBS
|
||||
fbjni::fbjni
|
||||
fbjni
|
||||
-Wl,--gc-sections
|
||||
-Wl,--whole-archive
|
||||
libtorch
|
||||
@ -133,14 +134,8 @@ if(ANDROID_ABI)
|
||||
libeigen_blas
|
||||
libcpuinfo
|
||||
libclog
|
||||
android
|
||||
log
|
||||
)
|
||||
else()
|
||||
set(fbjni_DIR ${CMAKE_CURRENT_LIST_DIR}/../libs/fbjni/)
|
||||
set(fbjni_BUILD_DIR ${CMAKE_BINARY_DIR}/fbjni/${BUILD_SUBDIR})
|
||||
add_subdirectory(${fbjni_DIR} ${fbjni_BUILD_DIR})
|
||||
|
||||
# Prefer dynamic linking on the host
|
||||
set(pytorch_jni_LIBS
|
||||
fbjni
|
||||
|
@ -34,9 +34,6 @@ android {
|
||||
minifyEnabled false
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
prefab true
|
||||
}
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
@ -76,7 +73,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.facebook.fbjni:fbjni:' + rootProject.fbjniVersion
|
||||
implementation 'com.facebook.fbjni:fbjni-java-only:' + rootProject.fbjniJavaOnlyVersion
|
||||
implementation 'com.android.support:appcompat-v7:' + rootProject.androidSupportAppCompatV7Version
|
||||
implementation 'com.facebook.soloader:nativeloader:' + rootProject.soLoaderNativeLoaderVersion
|
||||
|
||||
|
@ -32,8 +32,8 @@ sourceSets {
|
||||
|
||||
dependencies {
|
||||
compileOnly 'com.google.code.findbugs:jsr305:3.0.1'
|
||||
implementation 'com.facebook.soloader:nativeloader:0.10.1'
|
||||
implementation 'com.facebook.fbjni:fbjni-java-only:0.2.2'
|
||||
implementation 'com.facebook.soloader:nativeloader:0.8.0'
|
||||
implementation 'com.facebook.fbjni:fbjni-java-only:0.0.3'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
|
@ -112,7 +112,6 @@ android {
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
pickFirst '**/*.so'
|
||||
doNotStrip '**.so'
|
||||
}
|
||||
|
||||
@ -140,7 +139,7 @@ tasks.all { task ->
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.facebook.soloader:nativeloader:0.10.1'
|
||||
implementation 'com.facebook.soloader:nativeloader:0.8.0'
|
||||
|
||||
localImplementation project(':pytorch_android')
|
||||
localImplementation project(':pytorch_android_torchvision')
|
||||
@ -155,7 +154,8 @@ dependencies {
|
||||
|
||||
aarImplementation(name:'pytorch_android', ext:'aar')
|
||||
aarImplementation(name:'pytorch_android_torchvision', ext:'aar')
|
||||
aarImplementation 'com.facebook.fbjni:fbjni-java-only:0.2.2'
|
||||
aarImplementation 'com.facebook.soloader:nativeloader:0.8.0'
|
||||
aarImplementation 'com.facebook.fbjni:fbjni-java-only:0.0.3'
|
||||
|
||||
def camerax_version = "1.0.0-alpha05"
|
||||
cameraImplementation "androidx.camera:camera-core:$camerax_version"
|
||||
|
Reference in New Issue
Block a user