mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 08:37:06 +08:00

* [Android] Add VisSegmentation NEON support * [ARM] change vqaddq_u8 -> vaddq_u8 * [ARM] change vqaddq_u8 -> vaddq_u8 * [Bug Fix] add FDASSERT * update assert info * add QuantizeBlendingWeight8 * Update QuantizeBlendingWeight8 * Update VisSegmentation * [Visualize] add DefaultVisualizeType and EnableFastVisuzlie * fix typos * fix typo * Update VisSegmentation * [Android] Add omp parallel support for Android * Add omp schedule(static) * [Bug Fix] fix libomp.so not found error
86 lines
2.5 KiB
Groovy
86 lines
2.5 KiB
Groovy
apply plugin: 'com.android.library'
|
|
|
|
|
|
android {
|
|
compileSdk 28
|
|
|
|
defaultConfig {
|
|
minSdk 15
|
|
targetSdk 28
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
consumerProguardFiles "consumer-rules.pro"
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments '-DANDROID_PLATFORM=android-21', '-DANDROID_STL=c++_shared', "-DANDROID_TOOLCHAIN=clang"
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
|
cppFlags "-std=c++11"
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
externalNativeBuild {
|
|
cmake {
|
|
path "src/main/cpp/CMakeLists.txt"
|
|
version "3.10.2"
|
|
}
|
|
}
|
|
sourceSets {
|
|
main {
|
|
jniLibs.srcDirs = ['libs']
|
|
}
|
|
}
|
|
ndkVersion '20.1.5948944'
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation 'com.android.support:appcompat-v7:28.0.0'
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
|
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
|
}
|
|
|
|
def FD_CXX_LIB = [
|
|
[
|
|
'src' : 'https://bj.bcebos.com/fastdeploy/test/fastdeploy-android-latest-shared-dev.tgz',
|
|
'dest': 'libs'
|
|
]
|
|
]
|
|
|
|
task downloadAndExtractLibs(type: DefaultTask) {
|
|
doFirst {
|
|
println "Downloading and extracting fastdeploy android c++ lib ..."
|
|
}
|
|
doLast {
|
|
String cachePath = "cache"
|
|
if (!file("${cachePath}").exists()) {
|
|
mkdir "${cachePath}"
|
|
}
|
|
FD_CXX_LIB.eachWithIndex { lib, index ->
|
|
String[] libPaths = lib.src.split("/")
|
|
String libName = libPaths[libPaths.length - 1]
|
|
libName = libName.split("\\.")[0]
|
|
boolean copyFiles = !file("${lib.dest}/${libName}").exists()
|
|
if (!file("${cachePath}/${libName}.tgz").exists()) {
|
|
println "Downloading ${lib.src} -> ${cachePath}/${libName}.tgz"
|
|
ant.get(src: lib.src, dest: file("${cachePath}/${libName}.tgz"))
|
|
copyFiles = true
|
|
}
|
|
if (copyFiles) {
|
|
copy {
|
|
from tarTree("${cachePath}/${libName}.tgz")
|
|
into "${lib.dest}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
preBuild.dependsOn downloadAndExtractLibs |