forked from mindspore-Ecosystem/mindspore
npu_default_off
This commit is contained in:
parent
b7d200f32e
commit
c32d2a3e96
|
@ -20,8 +20,8 @@ endif()
|
||||||
|
|
||||||
# Options that can be configured through environment variables or manually
|
# Options that can be configured through environment variables or manually
|
||||||
set(MSLITE_GPU_BACKEND "" CACHE STRING "enable gpu backend, \
|
set(MSLITE_GPU_BACKEND "" CACHE STRING "enable gpu backend, \
|
||||||
only arm64 support opencl, only x86_64 support tensorrt, opencl/vulkan/cuda/tensorrt/off")
|
only arm64 support opencl, only x86_64 support tensorrt, opencl/vulkan/cuda/tensorrt/off")
|
||||||
option(MSLITE_ENABLE_NPU "enable npu, only arm64 or arm32 support" on)
|
option(MSLITE_ENABLE_NPU "enable npu, only arm64 or arm32 support" off)
|
||||||
option(MSLITE_ENABLE_TRAIN "enable train" on)
|
option(MSLITE_ENABLE_TRAIN "enable train" on)
|
||||||
option(MSLITE_ENABLE_SSE "enable SSE instruction set, only x86_64 support" off)
|
option(MSLITE_ENABLE_SSE "enable SSE instruction set, only x86_64 support" off)
|
||||||
option(MSLITE_ENABLE_AVX "enable AVX instruction set, only x86_64 support" off)
|
option(MSLITE_ENABLE_AVX "enable AVX instruction set, only x86_64 support" off)
|
||||||
|
@ -86,7 +86,6 @@ if(PLATFORM_ARM64)
|
||||||
elseif(PLATFORM_ARM32 OR WIN32)
|
elseif(PLATFORM_ARM32 OR WIN32)
|
||||||
set(MSLITE_GPU_BACKEND "off")
|
set(MSLITE_GPU_BACKEND "off")
|
||||||
else()
|
else()
|
||||||
# x86_64
|
|
||||||
if(MSLITE_GPU_BACKEND STREQUAL "")
|
if(MSLITE_GPU_BACKEND STREQUAL "")
|
||||||
set(MSLITE_GPU_BACKEND "off")
|
set(MSLITE_GPU_BACKEND "off")
|
||||||
endif()
|
endif()
|
||||||
|
@ -144,7 +143,6 @@ if(ENABLE_ASAN)
|
||||||
add_link_options(-fsanitize=address)
|
add_link_options(-fsanitize=address)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(PKG_NAME_PREFIX mindspore-lite-${MS_VERSION_MAJOR}.${MS_VERSION_MINOR}.${MS_VERSION_REVISION})
|
set(PKG_NAME_PREFIX mindspore-lite-${MS_VERSION_MAJOR}.${MS_VERSION_MINOR}.${MS_VERSION_REVISION})
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
|
||||||
set(BUILD_MINDDATA "lite_cv" CACHE STRING "off, lite, lite_cv, wrapper or full")
|
set(BUILD_MINDDATA "lite_cv" CACHE STRING "off, lite, lite_cv, wrapper or full")
|
||||||
|
|
|
@ -68,7 +68,7 @@ done
|
||||||
|
|
||||||
# package info
|
# package info
|
||||||
x86_path=${release_path}/ubuntu_x86
|
x86_path=${release_path}/ubuntu_x86
|
||||||
arm32_path=${release_path}/android_aarch32
|
arm32_path=${release_path}/android_aarch32/npu
|
||||||
file_name=$(ls ${x86_path}/*-linux-x64.tar.gz)
|
file_name=$(ls ${x86_path}/*-linux-x64.tar.gz)
|
||||||
IFS="-" read -r -a file_name_array <<< "$file_name"
|
IFS="-" read -r -a file_name_array <<< "$file_name"
|
||||||
version=${file_name_array[2]}
|
version=${file_name_array[2]}
|
||||||
|
|
|
@ -120,7 +120,7 @@ done
|
||||||
|
|
||||||
# package info
|
# package info
|
||||||
x86_path=${release_path}/ubuntu_x86
|
x86_path=${release_path}/ubuntu_x86
|
||||||
arm64_path=${release_path}/android_aarch64
|
arm64_path=${release_path}/android_aarch64/npu
|
||||||
file_name=$(ls ${x86_path}/*-linux-x64.tar.gz)
|
file_name=$(ls ${x86_path}/*-linux-x64.tar.gz)
|
||||||
IFS="-" read -r -a file_name_array <<< "$file_name"
|
IFS="-" read -r -a file_name_array <<< "$file_name"
|
||||||
version=${file_name_array[2]}
|
version=${file_name_array[2]}
|
||||||
|
|
|
@ -195,8 +195,8 @@ done
|
||||||
|
|
||||||
# package info
|
# package info
|
||||||
x86_path=${release_path}/ubuntu_x86
|
x86_path=${release_path}/ubuntu_x86
|
||||||
arm32_path=${release_path}/android_aarch32
|
arm32_path=${release_path}/android_aarch32/npu
|
||||||
arm64_path=${release_path}/android_aarch64
|
arm64_path=${release_path}/android_aarch64/npu
|
||||||
file_name=$(ls ${x86_path}/*-linux-x64.tar.gz)
|
file_name=$(ls ${x86_path}/*-linux-x64.tar.gz)
|
||||||
IFS="-" read -r -a file_name_array <<< "$file_name"
|
IFS="-" read -r -a file_name_array <<< "$file_name"
|
||||||
version=${file_name_array[2]}
|
version=${file_name_array[2]}
|
||||||
|
|
|
@ -167,7 +167,7 @@ isFailed=0
|
||||||
|
|
||||||
if [[ $backend == "all" || $backend == "gpu" ]]; then
|
if [[ $backend == "all" || $backend == "gpu" ]]; then
|
||||||
# Run on gpu
|
# Run on gpu
|
||||||
arm64_path=${release_path}/android_aarch64
|
arm64_path=${release_path}/android_aarch64/npu
|
||||||
# mv ${arm64_path}/*train-android-aarch64* ./train
|
# mv ${arm64_path}/*train-android-aarch64* ./train
|
||||||
file_name=$(ls ${arm64_path}/*android-aarch64.tar.gz)
|
file_name=$(ls ${arm64_path}/*android-aarch64.tar.gz)
|
||||||
IFS="-" read -r -a file_name_array <<< "$file_name"
|
IFS="-" read -r -a file_name_array <<< "$file_name"
|
||||||
|
|
|
@ -130,7 +130,7 @@ isFailed=0
|
||||||
|
|
||||||
if [[ $backend == "all" || $backend == "npu" ]]; then
|
if [[ $backend == "all" || $backend == "npu" ]]; then
|
||||||
# Run on npu
|
# Run on npu
|
||||||
arm64_path=${release_path}/android_aarch64
|
arm64_path=${release_path}/android_aarch64/npu
|
||||||
# mv ${arm64_path}/*train-android-aarch64* ./train
|
# mv ${arm64_path}/*train-android-aarch64* ./train
|
||||||
file_name=$(ls ${arm64_path}/*android-aarch64.tar.gz)
|
file_name=$(ls ${arm64_path}/*android-aarch64.tar.gz)
|
||||||
IFS="-" read -r -a file_name_array <<< "$file_name"
|
IFS="-" read -r -a file_name_array <<< "$file_name"
|
||||||
|
|
|
@ -115,7 +115,7 @@ run_cropper_log_file="${basepath}"/run_cropper_log.txt
|
||||||
echo 'run cropper logs: ' > "${run_cropper_log_file}"
|
echo 'run cropper logs: ' > "${run_cropper_log_file}"
|
||||||
|
|
||||||
cropper_config="${basepath}"/../config/models_cropper.cfg
|
cropper_config="${basepath}"/../config/models_cropper.cfg
|
||||||
arm64_path=${release_path}/android_aarch64
|
arm64_path=${release_path}/android_aarch64/npu
|
||||||
x86_path=${release_path}/ubuntu_x86
|
x86_path=${release_path}/ubuntu_x86
|
||||||
|
|
||||||
# Write converter result to temp file
|
# Write converter result to temp file
|
||||||
|
|
|
@ -402,13 +402,13 @@ then
|
||||||
fi
|
fi
|
||||||
echo $train_io_path
|
echo $train_io_path
|
||||||
|
|
||||||
arm64_path=${release_path}/android_aarch64
|
arm64_path=${release_path}/android_aarch64/npu
|
||||||
file=$(ls ${arm64_path}/*android-aarch64.tar.gz)
|
file=$(ls ${arm64_path}/*android-aarch64.tar.gz)
|
||||||
file_name="${file##*/}"
|
file_name="${file##*/}"
|
||||||
IFS="-" read -r -a file_name_array <<< "$file_name"
|
IFS="-" read -r -a file_name_array <<< "$file_name"
|
||||||
version_arm64=${file_name_array[2]}
|
version_arm64=${file_name_array[2]}
|
||||||
|
|
||||||
arm32_path=${release_path}/android_aarch32
|
arm32_path=${release_path}/android_aarch32/npu
|
||||||
file=$(ls ${arm32_path}/*android-aarch32.tar.gz)
|
file=$(ls ${arm32_path}/*android-aarch32.tar.gz)
|
||||||
file_name="${file##*/}"
|
file_name="${file##*/}"
|
||||||
IFS="-" read -r -a file_name_array <<< "$file_name"
|
IFS="-" read -r -a file_name_array <<< "$file_name"
|
||||||
|
|
|
@ -25,7 +25,7 @@ function android_release_package()
|
||||||
rm -rf ${pkg_name}
|
rm -rf ${pkg_name}
|
||||||
tar -xzf ${input_path}/android_${arch}/${device}/${pkg_name}.tar.gz
|
tar -xzf ${input_path}/android_${arch}/${device}/${pkg_name}.tar.gz
|
||||||
# Copy java runtime to Android package
|
# Copy java runtime to Android package
|
||||||
cp ${input_path}/aar/avx/mindspore-lite-*maven*.zip ${pkg_name}
|
cp ${input_path}/aar/mindspore-lite-*maven*.zip ${pkg_name}
|
||||||
|
|
||||||
mkdir -p ${output_path}/release/android/${device}/
|
mkdir -p ${output_path}/release/android/${device}/
|
||||||
tar -czf ${output_path}/release/android/${device}/${pkg_name}.tar.gz ${pkg_name}
|
tar -czf ${output_path}/release/android/${device}/${pkg_name}.tar.gz ${pkg_name}
|
||||||
|
@ -36,9 +36,9 @@ function android_release_package()
|
||||||
|
|
||||||
function ios_release_package()
|
function ios_release_package()
|
||||||
{
|
{
|
||||||
arch=$1
|
|
||||||
mkdir -p ${output_path}/release/ios/
|
mkdir -p ${output_path}/release/ios/
|
||||||
cp ${input_path}/ios_${arch}/*.tar.gz* ${output_path}/release/ios/
|
cp ${input_path}/ios_aarch64/*.tar.gz* ${output_path}/release/ios/
|
||||||
|
cp ${input_path}/ios_aarch32/*.tar.gz* ${output_path}/release/ios/
|
||||||
}
|
}
|
||||||
|
|
||||||
function linux_release_package()
|
function linux_release_package()
|
||||||
|
@ -51,6 +51,7 @@ function windows_release_package()
|
||||||
{
|
{
|
||||||
mkdir -p ${output_path}/release/windows/
|
mkdir -p ${output_path}/release/windows/
|
||||||
cp ${input_path}/windows_x64/avx/*.zip* ${output_path}/release/windows/
|
cp ${input_path}/windows_x64/avx/*.zip* ${output_path}/release/windows/
|
||||||
|
cp ${input_path}/windows_x32/sse/*.zip* ${output_path}/release/windows/
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "============================== begin =============================="
|
echo "============================== begin =============================="
|
||||||
|
@ -58,13 +59,14 @@ echo "Usage: bash lite_release_package.sh input_path output_path"
|
||||||
|
|
||||||
input_path=$1
|
input_path=$1
|
||||||
output_path=$2
|
output_path=$2
|
||||||
version=`ls ${input_path}/android_aarch64/mindspore-lite-*-*.tar.gz | awk -F'/' '{print $NF}' | cut -d"-" -f3`
|
version=`ls ${input_path}/android_aarch64/npu/mindspore-lite-*-*.tar.gz | awk -F'/' '{print $NF}' | cut -d"-" -f3`
|
||||||
|
|
||||||
android_release_package aarch32
|
android_release_package aarch32 npu
|
||||||
android_release_package aarch64
|
android_release_package aarch32 cpu
|
||||||
|
android_release_package aarch64 npu
|
||||||
android_release_package aarch64 gpu
|
android_release_package aarch64 gpu
|
||||||
ios_release_package aarch32
|
|
||||||
ios_release_package aarch64
|
ios_release_package
|
||||||
linux_release_package
|
linux_release_package
|
||||||
windows_release_package
|
windows_release_package
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue