update mindspore to 1.2.0

This commit is contained in:
hukang hwx963878 2021-04-15 17:14:07 +08:00
parent c43deb5469
commit 350884b2cc
3 changed files with 14 additions and 12 deletions

View File

@ -6,10 +6,10 @@
def targetModelFile = "src/main/assets/mobilenetv2.ms"
def modelDownloadUrl = "https://download.mindspore.cn/model_zoo/official/lite/mobilenetv2_imagenet/mobilenetv2.ms"
def mindsporeLite_Version = "mindspore-lite-1.1.0-inference-android"
def mindsporeLite_Version_AAR = "mindspore-lite-maven-1.1.0"
def mindsporeLite_Version = "mindspore-lite-1.2.0-android-aarch64"
def mindsporeLite_Version_AAR = "mindspore-lite-maven-1.2.0"
def mindsporeLiteDownloadUrl = "https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.0/MindSpore/lite/release/android/${mindsporeLite_Version}.tar.gz"
def mindsporeLiteDownloadUrl = "https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.2.0/MindSpore/lite/release/android/gpu/${mindsporeLite_Version}.tar.gz"
def targetRoot = "libs/"
def mindSporeLibrary = "${targetRoot}${mindsporeLite_Version}.tar.gz"
@ -54,7 +54,7 @@ task unzipMindSporeIncludeAAR(type: Copy, dependsOn: ['unzipMindSporeInclude'])
}
task copyAARToRoot(type: Copy, dependsOn: ['unzipMindSporeIncludeAAR']) {
from('libs/mindspore/mindspore-lite/1.1.0/mindspore-lite-1.1.0.aar')
from('libs/mindspore/mindspore-lite/1.2.0/mindspore-lite-1.2.0.aar')
into "${targetRoot}"
}
@ -73,7 +73,7 @@ task cleanUnuseFileAAR(type: Delete, dependsOn: ['cleanUnuseFiles']) {
}
if (file("libs/mindspore-lite-1.1.0.aar").exists()) {
if (file("libs/mindspore-lite-1.2.0.aar").exists()) {
downloadMindSporeLibrary.enabled = false
unzipMindSporeInclude.enabled = false
unzipMindSporeIncludeAAR.enabled = false

View File

@ -8,21 +8,23 @@ cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_VERBOSE_MAKEFILE on)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI})
set(MINDSPORELITE_VERSION mindspore-lite-1.1.1-runtime-arm64-cpu)
set(MINDSPORELITE_VERSION mindspore-lite-1.2.0-android-aarch64)
# ============== Set MindSpore Dependencies. =============
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp)
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION})
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/include)
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/minddata/include)
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/inference)
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/inference/include)
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/inference/minddata)
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/inference/minddata/include)
add_library(mindspore-lite SHARED IMPORTED)
add_library(minddata-lite SHARED IMPORTED)
set_target_properties(mindspore-lite PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/lib/libmindspore-lite.so)
${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/inference/lib/libmindspore-lite.so)
set_target_properties(minddata-lite PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/minddata/lib/libminddata-lite.so)
${CMAKE_SOURCE_DIR}/src/main/cpp/${MINDSPORELITE_VERSION}/inference/minddata/lib/libminddata-lite.so)
# --------------- MindSpore Lite set End. --------------------

View File

@ -4,13 +4,13 @@
* The libraries can be downloaded manually.
*/
def targetMindSporeInclude = "src/main/cpp/"
def mindsporeLite_Version = "mindspore-lite-1.1.1-runtime-arm64-cpu"
def mindsporeLite_Version = "mindspore-lite-1.2.0-android-aarch64"
def targetModelFile = "src/main/assets/model/mobilenetv2.ms"
def mindSporeLibrary_arm64 = "src/main/cpp/${mindsporeLite_Version}.tar.gz"
def modelDownloadUrl = "https://download.mindspore.cn/model_zoo/official/lite/mobilenetv2_openimage_lite/mobilenetv2.ms"
def mindsporeLiteDownloadUrl = "https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.1.1/MindSpore/lite/release_0220/android/${mindsporeLite_Version}.tar.gz"
def mindsporeLiteDownloadUrl = "https://ms-release.obs.cn-north-4.myhuaweicloud.com/1.2.0/MindSpore/lite/release/android/gpu/${mindsporeLite_Version}.tar.gz"
def cleantargetMindSporeInclude = "src/main/cpp"