!13480 fix trian example script

From: @xutianchun
Reviewed-by: @hangangqiang,@HilbertDavid
Signed-off-by: @HilbertDavid
This commit is contained in:
mindspore-ci-bot 2021-03-18 17:16:25 +08:00 committed by Gitee
commit 7cd339368d
6 changed files with 17 additions and 21 deletions

View File

@ -14,9 +14,9 @@ OBJ:=$(SRC:.cc=.o)
CFLAGS := -Ofast -std=c++17 \
-I . \
-I ./msl \
-I ./msl/minddata \
-I ./msl/third_party/flatbuffers/include
-I ./msl/train \
-I ./msl/train/minddata \
-I ./msl/train/third_party/flatbuffers/include
ifeq ($(TARGET),arm64)

View File

@ -14,8 +14,8 @@ CONVERTER="../../../build/tools/converter/converter_lite"
if [ ! -f "$CONVERTER" ]; then
if ! command -v converter_lite &> /dev/null
then
tar -xzf ../../../../../output/mindspore-lite-*-converter-linux-x64.tar.gz --strip-components 2 --wildcards --no-anchored converter_lite libmindspore_gvar.so
tar -xzf ../../../../../output/mindspore-lite-*-converter-linux-x64.tar.gz --strip-components 4 --wildcards --no-anchored libglog.so.0
tar -xzf ../../../../../output/mindspore-lite-*-train-linux-x64.tar.gz --strip-components 4 --wildcards --no-anchored converter_lite libmindspore_gvar.so
tar -xzf ../../../../../output/mindspore-lite-*-train-linux-x64.tar.gz --strip-components 6 --wildcards --no-anchored libglog.so.0
if [ -f ./converter_lite ]; then
CONVERTER=./converter_lite
else
@ -27,7 +27,6 @@ if [ ! -f "$CONVERTER" ]; then
fi
fi
echo "============Converting========="
LD_LIBRARY_PATH=./ $CONVERTER --fmk=MINDIR --trainModel=true --modelFile=lenet_tod.mindir --outputFile=lenet_tod

View File

@ -80,13 +80,9 @@ cp scripts/*.sh ${PACKAGE}/
# Copy the shared MindSpore ToD library
tar -xzf ${TARBALL}
mv mindspore-*/lib ${PACKAGE}/
mv mindspore-*/minddata/lib/* ${PACKAGE}/lib/
mv mindspore-*/minddata/third_party/libjpeg-turbo/lib/* ${PACKAGE}/lib/
if [ "${TARGET}" == "arm64" ]; then
tar -xzf ${TARBALL} --wildcards --no-anchored hiai_ddk
mv mindspore-*/third_party/hiai_ddk/lib/* ${PACKAGE}/lib/
fi
mv mindspore-*/train/lib ${PACKAGE}/
mv mindspore-*/train/minddata/lib/* ${PACKAGE}/lib/
mv mindspore-*/train/minddata/third_party/libjpeg-turbo/lib/* ${PACKAGE}/lib/
rm -rf msl
mkdir msl

View File

@ -8,15 +8,15 @@ OBJ:=$(SRC:.cc=.o)
CFLAGS := -Ofast -std=c++17 \
-I . \
-I ./msl \
-I ./msl/third_party/flatbuffers/include
-I ./msl/train \
-I ./msl/train/third_party/flatbuffers/include
ifeq ($(TARGET),arm64)
CXX := ${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
CFLAGS += --target=aarch64-none-linux-android21 --gcc-toolchain=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fdata-sections -ffunction-sections
LDFLAGS := --target=aarch64-none-linux-android21 --gcc-toolchain=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Wl,--gc-sections
LDFLAGS += -L$(MSDIR) -l$(MSLIB) -pthread -llog -latomic -lm
LDFLAGS += -L$(MSDIR) -l$(MSLIB) -pthread -llog -latomic -lm -Wl,-rpath,$(MSDIR)
else
CFLAGS += -g
LDFLAGS := -L$(MSDIR) -l$(MSLIB) -lpthread -Wl,-rpath,$(MSDIR)

View File

@ -18,8 +18,8 @@ CONVERTER="../../../build/tools/converter/converter_lite"
if [ ! -f "$CONVERTER" ]; then
if ! command -v converter_lite &> /dev/null
then
tar -xzf ../../../../../output/mindspore-lite-*-converter-linux-x64.tar.gz --strip-components 2 --wildcards --no-anchored converter_lite libmindspore_gvar.so
tar -xzf ../../../../../output/mindspore-lite-*-converter-linux-x64.tar.gz --strip-components 4 --wildcards --no-anchored libglog.so.0
tar -xzf ../../../../../output/mindspore-lite-*-train-linux-x64.tar.gz --strip-components 4 --wildcards --no-anchored converter_lite libmindspore_gvar.so
tar -xzf ../../../../../output/mindspore-lite-*-train-linux-x64.tar.gz --strip-components 6 --wildcards --no-anchored libglog.so.0
if [ -f ./converter_lite ]; then
CONVERTER=./converter_lite
else

View File

@ -78,9 +78,10 @@ cp model/*.ms ${PACKAGE}/model || exit 1
cp scripts/*.sh ${PACKAGE}/
# Copy the shared MindSpore ToD library
tar -xzf ${TARBALL} --wildcards --no-anchored libmindspore-lite.so
tar -xzf ${TARBALL} --wildcards --no-anchored include
mv mindspore-*/lib ${PACKAGE}/
tar -xzf ${TARBALL}
mv mindspore-*/train/lib ${PACKAGE}/
mv mindspore-*/train/minddata/lib/* ${PACKAGE}/lib/
mv mindspore-*/train/minddata/third_party/libjpeg-turbo/lib/* ${PACKAGE}/lib/
rm -rf msl
mkdir msl
mv mindspore-*/* msl/