diff --git a/official/audio/ecapa_tdnn/ascend310_infer/build.sh b/official/audio/ecapa_tdnn/ascend310_infer/build.sh
index 1aa5b25bc85b3aad7d595d3a18c7eb4154684959..2d932f841451e29cc7bf6b0033254cbfe96c04d0 100644
--- a/official/audio/ecapa_tdnn/ascend310_infer/build.sh
+++ b/official/audio/ecapa_tdnn/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d build ]; then
mkdir build
fi
cd build || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/audio/lpcnet/ascend310_infer/build.sh b/official/audio/lpcnet/ascend310_infer/build.sh
index 8f9dc18582e53b4a9739be60f9ff67b203dcd8bc..c0cfabb9dc597b76dfb328f1d835a546ce95d969 100644
--- a/official/audio/lpcnet/ascend310_infer/build.sh
+++ b/official/audio/lpcnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/audio/melgan/ascend310_infer/build.sh b/official/audio/melgan/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..ea1682c0472b9b54067d9f2e555fd2720257ece2 100644
--- a/official/audio/melgan/ascend310_infer/build.sh
+++ b/official/audio/melgan/ascend310_infer/build.sh
@@ -18,6 +18,10 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/Deepsort/ascend310_infer/build.sh b/official/cv/Deepsort/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/Deepsort/ascend310_infer/build.sh
+++ b/official/cv/Deepsort/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/FCN8s/ascend310_infer/build.sh b/official/cv/FCN8s/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/FCN8s/ascend310_infer/build.sh
+++ b/official/cv/FCN8s/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/MCNN/ascend310_infer/build.sh b/official/cv/MCNN/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/MCNN/ascend310_infer/build.sh
+++ b/official/cv/MCNN/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/RDN/ascend310_infer/build.sh b/official/cv/RDN/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/RDN/ascend310_infer/build.sh
+++ b/official/cv/RDN/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/alexnet/ascend310_infer/build.sh b/official/cv/alexnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/alexnet/ascend310_infer/build.sh
+++ b/official/cv/alexnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/brdnet/ascend310_infer/build.sh b/official/cv/brdnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/brdnet/ascend310_infer/build.sh
+++ b/official/cv/brdnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/c3d/ascend310_infer/build.sh b/official/cv/c3d/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/c3d/ascend310_infer/build.sh
+++ b/official/cv/c3d/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/centerface/ascend310_infer/build.sh b/official/cv/centerface/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/centerface/ascend310_infer/build.sh
+++ b/official/cv/centerface/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/cnn_direction_model/ascend310_infer/build.sh b/official/cv/cnn_direction_model/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/cnn_direction_model/ascend310_infer/build.sh
+++ b/official/cv/cnn_direction_model/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/cnnctc/ascend310_infer/build.sh b/official/cv/cnnctc/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/cnnctc/ascend310_infer/build.sh
+++ b/official/cv/cnnctc/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/crnn/ascend310_infer/build.sh b/official/cv/crnn/ascend310_infer/build.sh
index 90ce11f12d5d493c9465d9ea94961f2cd29dbc42..d61574e4a3d3312333af4ad01ce23c1217b07a46 100644
--- a/official/cv/crnn/ascend310_infer/build.sh
+++ b/official/cv/crnn/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/crnn_seq2seq_ocr/ascend310_infer/build.sh b/official/cv/crnn_seq2seq_ocr/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/crnn_seq2seq_ocr/ascend310_infer/build.sh
+++ b/official/cv/crnn_seq2seq_ocr/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/cspdarknet53/ascend310_infer/build.sh b/official/cv/cspdarknet53/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/cspdarknet53/ascend310_infer/build.sh
+++ b/official/cv/cspdarknet53/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/ctpn/ascend310_infer/build.sh b/official/cv/ctpn/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/ctpn/ascend310_infer/build.sh
+++ b/official/cv/ctpn/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/deeplabv3/ascend310_infer/build.sh b/official/cv/deeplabv3/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/deeplabv3/ascend310_infer/build.sh
+++ b/official/cv/deeplabv3/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/deeptext/ascend310_infer/build.sh b/official/cv/deeptext/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/deeptext/ascend310_infer/build.sh
+++ b/official/cv/deeptext/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/densenet/ascend310_infer/build.sh b/official/cv/densenet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/densenet/ascend310_infer/build.sh
+++ b/official/cv/densenet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/depthnet/ascend310_infer/build.sh b/official/cv/depthnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/depthnet/ascend310_infer/build.sh
+++ b/official/cv/depthnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/dpn/ascend310_infer/build.sh b/official/cv/dpn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/dpn/ascend310_infer/build.sh
+++ b/official/cv/dpn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/east/ascend310_infer/build.sh b/official/cv/east/ascend310_infer/build.sh
index 7571e9c03ff03aa3bc523d70969082ce19d1253b..6dda637c448de42760a605dc7f569f1d2aee419a 100644
--- a/official/cv/east/ascend310_infer/build.sh
+++ b/official/cv/east/ascend310_infer/build.sh
@@ -24,7 +24,10 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/erfnet/ascend310_infer/src/build.sh b/official/cv/erfnet/ascend310_infer/src/build.sh
index 74b0cf67637c73b30b25825ea80be000a50f10ce..996e4df3464baf393b18d49d8995a116ee43894f 100644
--- a/official/cv/erfnet/ascend310_infer/src/build.sh
+++ b/official/cv/erfnet/ascend310_infer/src/build.sh
@@ -15,6 +15,10 @@
# ============================================================================
mkdir build
cd build
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
cd ..
\ No newline at end of file
diff --git a/official/cv/faster_rcnn/ascend310_infer/build.sh b/official/cv/faster_rcnn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/faster_rcnn/ascend310_infer/build.sh
+++ b/official/cv/faster_rcnn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/fastscnn/ascend310_infer/build.sh b/official/cv/fastscnn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/fastscnn/ascend310_infer/build.sh
+++ b/official/cv/fastscnn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/googlenet/ascend310_infer/build.sh b/official/cv/googlenet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/googlenet/ascend310_infer/build.sh
+++ b/official/cv/googlenet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/inceptionv3/ascend310_infer/build.sh b/official/cv/inceptionv3/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/inceptionv3/ascend310_infer/build.sh
+++ b/official/cv/inceptionv3/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/inceptionv4/ascend310_infer/build.sh b/official/cv/inceptionv4/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/inceptionv4/ascend310_infer/build.sh
+++ b/official/cv/inceptionv4/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/lenet/ascend310_infer/build.sh b/official/cv/lenet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/lenet/ascend310_infer/build.sh
+++ b/official/cv/lenet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/maskrcnn/ascend310_infer/build.sh b/official/cv/maskrcnn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/maskrcnn/ascend310_infer/build.sh
+++ b/official/cv/maskrcnn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/maskrcnn_mobilenetv1/ascend310_infer/build.sh b/official/cv/maskrcnn_mobilenetv1/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/maskrcnn_mobilenetv1/ascend310_infer/build.sh
+++ b/official/cv/maskrcnn_mobilenetv1/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/mobilenetv1/ascend310_infer/build.sh b/official/cv/mobilenetv1/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/mobilenetv1/ascend310_infer/build.sh
+++ b/official/cv/mobilenetv1/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/mobilenetv2/ascend310_infer/build.sh b/official/cv/mobilenetv2/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/mobilenetv2/ascend310_infer/build.sh
+++ b/official/cv/mobilenetv2/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/mobilenetv3/ascend310_infer/build.sh b/official/cv/mobilenetv3/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/mobilenetv3/ascend310_infer/build.sh
+++ b/official/cv/mobilenetv3/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/nasnet/ascend310_infer/build.sh b/official/cv/nasnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/nasnet/ascend310_infer/build.sh
+++ b/official/cv/nasnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/nima/ascend310_infer/build.sh b/official/cv/nima/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/nima/ascend310_infer/build.sh
+++ b/official/cv/nima/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/octsqueeze/ascend310_infer/build.sh b/official/cv/octsqueeze/ascend310_infer/build.sh
index 24c2168a310b97c87c2b9514858684f5e0a3c9ef..8f23b7d57c9348d6db9cd1e70b0eda7c568e1e49 100644
--- a/official/cv/octsqueeze/ascend310_infer/build.sh
+++ b/official/cv/octsqueeze/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d builds ]; then
mkdir builds
fi
cd builds || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/official/cv/patchcore/ascend_310_infer/build.sh b/official/cv/patchcore/ascend_310_infer/build.sh
index ce42b350ee7c55402425380af96e824e2a8fa28b..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/official/cv/patchcore/ascend_310_infer/build.sh
+++ b/official/cv/patchcore/ascend_310_infer/build.sh
@@ -25,5 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/posenet/ascend310_infer/build.sh b/official/cv/posenet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/posenet/ascend310_infer/build.sh
+++ b/official/cv/posenet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/predrnn++/ascend310_infer/build.sh b/official/cv/predrnn++/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/official/cv/predrnn++/ascend310_infer/build.sh
+++ b/official/cv/predrnn++/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/psenet/ascend310_infer/build.sh b/official/cv/psenet/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/official/cv/psenet/ascend310_infer/build.sh
+++ b/official/cv/psenet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/official/cv/pvnet/ascend310_infer/build.sh b/official/cv/pvnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/pvnet/ascend310_infer/build.sh
+++ b/official/cv/pvnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/resnet/ascend310_infer/src/build.sh b/official/cv/resnet/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/official/cv/resnet/ascend310_infer/src/build.sh
+++ b/official/cv/resnet/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/official/cv/resnext/ascend310_infer/src/build.sh b/official/cv/resnext/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/official/cv/resnext/ascend310_infer/src/build.sh
+++ b/official/cv/resnext/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/official/cv/retinanet/ascend310_infer/build.sh b/official/cv/retinanet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/retinanet/ascend310_infer/build.sh
+++ b/official/cv/retinanet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/se_resnext50/ascend310_infer/src/build.sh b/official/cv/se_resnext50/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/official/cv/se_resnext50/ascend310_infer/src/build.sh
+++ b/official/cv/se_resnext50/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/official/cv/semantic_human_matting/ascend310_infer/build.sh b/official/cv/semantic_human_matting/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/semantic_human_matting/ascend310_infer/build.sh
+++ b/official/cv/semantic_human_matting/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/shufflenetv1/ascend310_infer/build.sh b/official/cv/shufflenetv1/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/shufflenetv1/ascend310_infer/build.sh
+++ b/official/cv/shufflenetv1/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/shufflenetv2/ascend310_infer/build.sh b/official/cv/shufflenetv2/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/shufflenetv2/ascend310_infer/build.sh
+++ b/official/cv/shufflenetv2/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/simclr/ascend310_infer/build.sh b/official/cv/simclr/ascend310_infer/build.sh
index 7571e9c03ff03aa3bc523d70969082ce19d1253b..6dda637c448de42760a605dc7f569f1d2aee419a 100644
--- a/official/cv/simclr/ascend310_infer/build.sh
+++ b/official/cv/simclr/ascend310_infer/build.sh
@@ -24,7 +24,10 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/simple_pose/ascend310_infer/build.sh b/official/cv/simple_pose/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/simple_pose/ascend310_infer/build.sh
+++ b/official/cv/simple_pose/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/sphereface/ascend310_infer/build.sh b/official/cv/sphereface/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/sphereface/ascend310_infer/build.sh
+++ b/official/cv/sphereface/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/squeezenet/ascend310_infer/build.sh b/official/cv/squeezenet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/squeezenet/ascend310_infer/build.sh
+++ b/official/cv/squeezenet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/srcnn/ascend310_infer/build.sh b/official/cv/srcnn/ascend310_infer/build.sh
index ee9801ef025b4d3228718f69dc34ab87307db519..410c49acf9f11510533855a020de88d92ffd369c 100644
--- a/official/cv/srcnn/ascend310_infer/build.sh
+++ b/official/cv/srcnn/ascend310_infer/build.sh
@@ -24,5 +24,9 @@ fi
mkdir out
cd out
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/ssd/ascend310_infer/build.sh b/official/cv/ssd/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/ssd/ascend310_infer/build.sh
+++ b/official/cv/ssd/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/ssim-ae/ascend310_infer/build.sh b/official/cv/ssim-ae/ascend310_infer/build.sh
index 1759100697aeead1f2782f5464f3e5cee2292f02..d3aa56653782dbf75ff6ec7c41905bf342696322 100644
--- a/official/cv/ssim-ae/ascend310_infer/build.sh
+++ b/official/cv/ssim-ae/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/tinydarknet/ascend310_infer/build.sh b/official/cv/tinydarknet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/tinydarknet/ascend310_infer/build.sh
+++ b/official/cv/tinydarknet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/unet/ascend310_infer/src/build.sh b/official/cv/unet/ascend310_infer/src/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/official/cv/unet/ascend310_infer/src/build.sh
+++ b/official/cv/unet/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/unet3d/ascend310_infer/build.sh b/official/cv/unet3d/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/unet3d/ascend310_infer/build.sh
+++ b/official/cv/unet3d/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/vgg16/ascend310_infer/build.sh b/official/cv/vgg16/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/vgg16/ascend310_infer/build.sh
+++ b/official/cv/vgg16/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/vit/ascend310_infer/src/build.sh b/official/cv/vit/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/official/cv/vit/ascend310_infer/src/build.sh
+++ b/official/cv/vit/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/official/cv/warpctc/ascend310_infer/build.sh b/official/cv/warpctc/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/warpctc/ascend310_infer/build.sh
+++ b/official/cv/warpctc/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/xception/ascend310_infer/build.sh b/official/cv/xception/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/xception/ascend310_infer/build.sh
+++ b/official/cv/xception/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/yolov3_darknet53/ascend310_infer/build.sh b/official/cv/yolov3_darknet53/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/yolov3_darknet53/ascend310_infer/build.sh
+++ b/official/cv/yolov3_darknet53/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/yolov3_resnet18/ascend310_infer/build.sh b/official/cv/yolov3_resnet18/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/cv/yolov3_resnet18/ascend310_infer/build.sh
+++ b/official/cv/yolov3_resnet18/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/yolov4/ascend310_infer/src/build.sh b/official/cv/yolov4/ascend310_infer/src/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/official/cv/yolov4/ascend310_infer/src/build.sh
+++ b/official/cv/yolov4/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/cv/yolov5/ascend310_infer/build.sh b/official/cv/yolov5/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/official/cv/yolov5/ascend310_infer/build.sh
+++ b/official/cv/yolov5/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/gnn/bgcf/ascend310_infer/build.sh b/official/gnn/bgcf/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/gnn/bgcf/ascend310_infer/build.sh
+++ b/official/gnn/bgcf/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/gnn/gat/ascend310_infer/build.sh b/official/gnn/gat/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/gnn/gat/ascend310_infer/build.sh
+++ b/official/gnn/gat/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/gnn/gcn/ascend310_infer/build.sh b/official/gnn/gcn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/gnn/gcn/ascend310_infer/build.sh
+++ b/official/gnn/gcn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/bert/ascend310_infer/build.sh b/official/nlp/bert/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/bert/ascend310_infer/build.sh
+++ b/official/nlp/bert/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/dgu/ascend310_infer/build.sh b/official/nlp/dgu/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/dgu/ascend310_infer/build.sh
+++ b/official/nlp/dgu/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/duconv/ascend310_infer/build.sh b/official/nlp/duconv/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/duconv/ascend310_infer/build.sh
+++ b/official/nlp/duconv/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/emotect/ascend310_infer/build.sh b/official/nlp/emotect/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/emotect/ascend310_infer/build.sh
+++ b/official/nlp/emotect/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/ernie/ascend310_infer/build.sh b/official/nlp/ernie/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/ernie/ascend310_infer/build.sh
+++ b/official/nlp/ernie/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/gru/ascend310_infer/build.sh b/official/nlp/gru/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/gru/ascend310_infer/build.sh
+++ b/official/nlp/gru/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/lstm/ascend310_infer/build.sh b/official/nlp/lstm/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/lstm/ascend310_infer/build.sh
+++ b/official/nlp/lstm/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/mass/ascend310_infer/build.sh b/official/nlp/mass/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/mass/ascend310_infer/build.sh
+++ b/official/nlp/mass/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/textcnn/ascend310_infer/build.sh b/official/nlp/textcnn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/textcnn/ascend310_infer/build.sh
+++ b/official/nlp/textcnn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/tinybert/ascend310_infer/build.sh b/official/nlp/tinybert/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/tinybert/ascend310_infer/build.sh
+++ b/official/nlp/tinybert/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/nlp/transformer/ascend310_infer/build.sh b/official/nlp/transformer/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/nlp/transformer/ascend310_infer/build.sh
+++ b/official/nlp/transformer/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/recommend/deepfm/ascend310_infer/build.sh b/official/recommend/deepfm/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/recommend/deepfm/ascend310_infer/build.sh
+++ b/official/recommend/deepfm/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/recommend/naml/ascend310_infer/build.sh b/official/recommend/naml/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/recommend/naml/ascend310_infer/build.sh
+++ b/official/recommend/naml/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/recommend/ncf/ascend310_infer/build.sh b/official/recommend/ncf/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/official/recommend/ncf/ascend310_infer/build.sh
+++ b/official/recommend/ncf/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/official/recommend/wide_and_deep/ascend310_infer/build.sh b/official/recommend/wide_and_deep/ascend310_infer/build.sh
index 32ff98d8f5270f34e6470c7cbab7eb47a4aac8ab..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/official/recommend/wide_and_deep/ascend310_infer/build.sh
+++ b/official/recommend/wide_and_deep/ascend310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/audio/ctcmodel/ascend310_infer/build.sh b/research/audio/ctcmodel/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/audio/ctcmodel/ascend310_infer/build.sh
+++ b/research/audio/ctcmodel/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/audio/dscnn/ascend310_infer/build.sh b/research/audio/dscnn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/audio/dscnn/ascend310_infer/build.sh
+++ b/research/audio/dscnn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/audio/fcn-4/ascend310_infer/build.sh b/research/audio/fcn-4/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/audio/fcn-4/ascend310_infer/build.sh
+++ b/research/audio/fcn-4/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/audio/jasper/ascend310_infer/build.sh b/research/audio/jasper/ascend310_infer/build.sh
index c12df0d7958d0f01f250ef01ebd7782a4193bd89..15f1c327e9898718a6e576ade891b130b874aec9 100644
--- a/research/audio/jasper/ascend310_infer/build.sh
+++ b/research/audio/jasper/ascend310_infer/build.sh
@@ -24,7 +24,10 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/3dcnn/ascend_310_infer/build.sh b/research/cv/3dcnn/ascend_310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/3dcnn/ascend_310_infer/build.sh
+++ b/research/cv/3dcnn/ascend_310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/APDrawingGAN/ascend310_infer/build.sh b/research/cv/APDrawingGAN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/APDrawingGAN/ascend310_infer/build.sh
+++ b/research/cv/APDrawingGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/AVA_cifar/ascend310_infer/build.sh b/research/cv/AVA_cifar/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/research/cv/AVA_cifar/ascend310_infer/build.sh
+++ b/research/cv/AVA_cifar/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/AVA_hpa/ascend310_infer/build.sh b/research/cv/AVA_hpa/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/research/cv/AVA_hpa/ascend310_infer/build.sh
+++ b/research/cv/AVA_hpa/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/AlignedReID++/ascend310_infer/build.sh b/research/cv/AlignedReID++/ascend310_infer/build.sh
index ff007f0ed02bac338deeaedb890f192ea1165de6..0d0499b0edee5af3adf0223719781a5a03518c4e 100644
--- a/research/cv/AlignedReID++/ascend310_infer/build.sh
+++ b/research/cv/AlignedReID++/ascend310_infer/build.sh
@@ -21,6 +21,9 @@ fi
mkdir out
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/AlphaPose/ascend310_infer/build.sh b/research/cv/AlphaPose/ascend310_infer/build.sh
index ce42b350ee7c55402425380af96e824e2a8fa28b..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/AlphaPose/ascend310_infer/build.sh
+++ b/research/cv/AlphaPose/ascend310_infer/build.sh
@@ -25,5 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ArbitraryStyleTransfer/ascend310_infer/build.sh b/research/cv/ArbitraryStyleTransfer/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/ArbitraryStyleTransfer/ascend310_infer/build.sh
+++ b/research/cv/ArbitraryStyleTransfer/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/AttGAN/ascend310_infer/build.sh b/research/cv/AttGAN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/AttGAN/ascend310_infer/build.sh
+++ b/research/cv/AttGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/AttentionCluster/ascend310_infer/build.sh b/research/cv/AttentionCluster/ascend310_infer/build.sh
index 7571e9c03ff03aa3bc523d70969082ce19d1253b..6dda637c448de42760a605dc7f569f1d2aee419a 100644
--- a/research/cv/AttentionCluster/ascend310_infer/build.sh
+++ b/research/cv/AttentionCluster/ascend310_infer/build.sh
@@ -24,7 +24,10 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/Auto-DeepLab/ascend310_infer/build.sh b/research/cv/Auto-DeepLab/ascend310_infer/build.sh
index 11de49c7d673972387647e36e7e9e2be0880972c..0813e908f2cd199bb97a4774eb20aa59013c6d86 100644
--- a/research/cv/Auto-DeepLab/ascend310_infer/build.sh
+++ b/research/cv/Auto-DeepLab/ascend310_infer/build.sh
@@ -33,6 +33,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/AutoSlim/ascend310_infer/build.sh b/research/cv/AutoSlim/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/AutoSlim/ascend310_infer/build.sh
+++ b/research/cv/AutoSlim/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/CGAN/ascend310_infer/build.sh b/research/cv/CGAN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/CGAN/ascend310_infer/build.sh
+++ b/research/cv/CGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/CycleGAN/ascend310_infer/build.sh b/research/cv/CycleGAN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/CycleGAN/ascend310_infer/build.sh
+++ b/research/cv/CycleGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/DBPN/ascend310_infer/build.sh b/research/cv/DBPN/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/DBPN/ascend310_infer/build.sh
+++ b/research/cv/DBPN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/DDRNet/ascend310_infer/build.sh b/research/cv/DDRNet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/DDRNet/ascend310_infer/build.sh
+++ b/research/cv/DDRNet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/DeepID/ascend310_infer/src/build.sh b/research/cv/DeepID/ascend310_infer/src/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/research/cv/DeepID/ascend310_infer/src/build.sh
+++ b/research/cv/DeepID/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/E-NET/ascend310_infer/src/build.sh b/research/cv/E-NET/ascend310_infer/src/build.sh
index afa87fa4f3e60ec00817f41b98b22724b87a304e..32c70bd8bdf63aa3949baf2105ce2dfea8309248 100644
--- a/research/cv/E-NET/ascend310_infer/src/build.sh
+++ b/research/cv/E-NET/ascend310_infer/src/build.sh
@@ -15,6 +15,10 @@
# ============================================================================
mkdir build
cd build
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
cd ..
\ No newline at end of file
diff --git a/research/cv/EDSR/ascend310_infer/build.sh b/research/cv/EDSR/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/EDSR/ascend310_infer/build.sh
+++ b/research/cv/EDSR/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/EGnet/ascend310_infer/build.sh b/research/cv/EGnet/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/EGnet/ascend310_infer/build.sh
+++ b/research/cv/EGnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ESRGAN/ascend310_infer/build.sh b/research/cv/ESRGAN/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/ESRGAN/ascend310_infer/build.sh
+++ b/research/cv/ESRGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/FaceAttribute/ascend310_infer/build.sh b/research/cv/FaceAttribute/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/FaceAttribute/ascend310_infer/build.sh
+++ b/research/cv/FaceAttribute/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/FaceDetection/ascend310_infer/build.sh b/research/cv/FaceDetection/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/FaceDetection/ascend310_infer/build.sh
+++ b/research/cv/FaceDetection/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/FaceQualityAssessment/ascend310_infer/build.sh b/research/cv/FaceQualityAssessment/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/FaceQualityAssessment/ascend310_infer/build.sh
+++ b/research/cv/FaceQualityAssessment/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/FaceRecognition/ascend310_infer/build.sh b/research/cv/FaceRecognition/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/FaceRecognition/ascend310_infer/build.sh
+++ b/research/cv/FaceRecognition/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/FaceRecognitionForTracking/ascend310_infer/build.sh b/research/cv/FaceRecognitionForTracking/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/FaceRecognitionForTracking/ascend310_infer/build.sh
+++ b/research/cv/FaceRecognitionForTracking/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/GENet_Res50/ascend310_infer/src/build.sh b/research/cv/GENet_Res50/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/GENet_Res50/ascend310_infer/src/build.sh
+++ b/research/cv/GENet_Res50/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/HRNetW48_seg/ascend310_infer/src/build.sh b/research/cv/HRNetW48_seg/ascend310_infer/src/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/research/cv/HRNetW48_seg/ascend310_infer/src/build.sh
+++ b/research/cv/HRNetW48_seg/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/I3D/ascend_310_infer/build.sh b/research/cv/I3D/ascend_310_infer/build.sh
index ad7b79db5993c33aae364590fad6ec4bb79ec293..657a5484a0b889cdc908fa3ab71b1c8e7212c25f 100644
--- a/research/cv/I3D/ascend_310_infer/build.sh
+++ b/research/cv/I3D/ascend_310_infer/build.sh
@@ -27,6 +27,9 @@ fi
#cd ../src
-cmake . \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ICNet/ascend310_infer/build.sh b/research/cv/ICNet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/ICNet/ascend310_infer/build.sh
+++ b/research/cv/ICNet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/LearningToSeeInTheDark/ascend310_infer/src/build.sh b/research/cv/LearningToSeeInTheDark/ascend310_infer/src/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/research/cv/LearningToSeeInTheDark/ascend310_infer/src/build.sh
+++ b/research/cv/LearningToSeeInTheDark/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/LightCNN/ascend310_infer/src/build.sh b/research/cv/LightCNN/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/LightCNN/ascend310_infer/src/build.sh
+++ b/research/cv/LightCNN/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/MGN/ascend310_infer/build.sh b/research/cv/MGN/ascend310_infer/build.sh
index 8f9dc18582e53b4a9739be60f9ff67b203dcd8bc..c0cfabb9dc597b76dfb328f1d835a546ce95d969 100644
--- a/research/cv/MGN/ascend310_infer/build.sh
+++ b/research/cv/MGN/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/NFNet/ascend310_infer/build.sh b/research/cv/NFNet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/NFNet/ascend310_infer/build.sh
+++ b/research/cv/NFNet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/Neighbor2Neighbor/ascend310_infer/build.sh b/research/cv/Neighbor2Neighbor/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/Neighbor2Neighbor/ascend310_infer/build.sh
+++ b/research/cv/Neighbor2Neighbor/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/OCRNet/ascend310_infer/src/build.sh b/research/cv/OCRNet/ascend310_infer/src/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/research/cv/OCRNet/ascend310_infer/src/build.sh
+++ b/research/cv/OCRNet/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/PAGENet/ascend310_infer/build.sh b/research/cv/PAGENet/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/PAGENet/ascend310_infer/build.sh
+++ b/research/cv/PAGENet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/PAMTRI/MultiTaskNet/ascend_310_infer/build.sh b/research/cv/PAMTRI/MultiTaskNet/ascend_310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/PAMTRI/MultiTaskNet/ascend_310_infer/build.sh
+++ b/research/cv/PAMTRI/MultiTaskNet/ascend_310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/PAMTRI/PoseEstNet/ascend_310_infer/build.sh b/research/cv/PAMTRI/PoseEstNet/ascend_310_infer/build.sh
index 32ff98d8f5270f34e6470c7cbab7eb47a4aac8ab..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/PAMTRI/PoseEstNet/ascend_310_infer/build.sh
+++ b/research/cv/PAMTRI/PoseEstNet/ascend_310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/PDarts/ascend310_infer/build.sh b/research/cv/PDarts/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/PDarts/ascend310_infer/build.sh
+++ b/research/cv/PDarts/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/PGAN/ascend310_infer/build.sh b/research/cv/PGAN/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/research/cv/PGAN/ascend310_infer/build.sh
+++ b/research/cv/PGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/PSPNet/ascend310_infer/build.sh b/research/cv/PSPNet/ascend310_infer/build.sh
index af419295444eda168b53cec600bb556da2881419..c3d70e49442a35edb12ef8cf9b51a25d6108da93 100644
--- a/research/cv/PSPNet/ascend310_infer/build.sh
+++ b/research/cv/PSPNet/ascend310_infer/build.sh
@@ -26,6 +26,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/Pix2Pix/ascend310_infer/build.sh b/research/cv/Pix2Pix/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/Pix2Pix/ascend310_infer/build.sh
+++ b/research/cv/Pix2Pix/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ProtoNet/ascend310_infer/build.sh b/research/cv/ProtoNet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/ProtoNet/ascend310_infer/build.sh
+++ b/research/cv/ProtoNet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/RCAN/ascend310_infer/build.sh b/research/cv/RCAN/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/RCAN/ascend310_infer/build.sh
+++ b/research/cv/RCAN/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/REDNet30/ascend310_infer/build.sh b/research/cv/REDNet30/ascend310_infer/build.sh
index e7b96c16e51afa8a715c1cd6c81d21d25da79cf2..65aa8cfd49d343b90d366e7e6366d13b8bdc905a 100644
--- a/research/cv/REDNet30/ascend310_infer/build.sh
+++ b/research/cv/REDNet30/ascend310_infer/build.sh
@@ -20,6 +20,9 @@ fi
mkdir out
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ReIDStrongBaseline/ascend310_infer/build.sh b/research/cv/ReIDStrongBaseline/ascend310_infer/build.sh
index a6a9ed6f01913ebb27018273a2412fece3dc3d3c..1fa75d6b12293c115563a1f78c4dd4092cede527 100644
--- a/research/cv/ReIDStrongBaseline/ascend310_infer/build.sh
+++ b/research/cv/ReIDStrongBaseline/ascend310_infer/build.sh
@@ -21,6 +21,9 @@ fi
mkdir out
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/RefineDet/ascend310_infer/build.sh b/research/cv/RefineDet/ascend310_infer/build.sh
index 01eddc6477829b9c2f16bdd83e2dd99d3887ac5c..8568d8f89015a84db7835d943ead08aaea90171f 100644
--- a/research/cv/RefineDet/ascend310_infer/build.sh
+++ b/research/cv/RefineDet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/RefineNet/ascend310_infer/build.sh b/research/cv/RefineNet/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/research/cv/RefineNet/ascend310_infer/build.sh
+++ b/research/cv/RefineNet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/ResNeSt50/ascend310_infer/build.sh b/research/cv/ResNeSt50/ascend310_infer/build.sh
index ce42b350ee7c55402425380af96e824e2a8fa28b..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/ResNeSt50/ascend310_infer/build.sh
+++ b/research/cv/ResNeSt50/ascend310_infer/build.sh
@@ -25,5 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ResidualAttentionNet/ascend310_infer/build.sh b/research/cv/ResidualAttentionNet/ascend310_infer/build.sh
index 7c741ce066c0746001c4210e5d8492f8435daa0c..54295031e415a2354aa4e7590afebddc0f728837 100644
--- a/research/cv/ResidualAttentionNet/ascend310_infer/build.sh
+++ b/research/cv/ResidualAttentionNet/ascend310_infer/build.sh
@@ -20,7 +20,10 @@ fi
cd out || exit
pip show mindspore-ascend
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/SE-Net/ascend310_infer/build.sh b/research/cv/SE-Net/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/SE-Net/ascend310_infer/build.sh
+++ b/research/cv/SE-Net/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/SE_ResNeXt50/ascend310_infer/build.sh b/research/cv/SE_ResNeXt50/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/SE_ResNeXt50/ascend310_infer/build.sh
+++ b/research/cv/SE_ResNeXt50/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/SPPNet/ascend310_infer/src/build.sh b/research/cv/SPPNet/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/SPPNet/ascend310_infer/src/build.sh
+++ b/research/cv/SPPNet/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/SRGAN/ascend310_infer/build.sh b/research/cv/SRGAN/ascend310_infer/build.sh
index a3afcf5a1393c68f1f2b8cb661507f24d9856c89..b75736515f450a7e32993f3bc31cb4a4337a81ea 100644
--- a/research/cv/SRGAN/ascend310_infer/build.sh
+++ b/research/cv/SRGAN/ascend310_infer/build.sh
@@ -24,5 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/STGAN/ascend310_infer/build.sh b/research/cv/STGAN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/STGAN/ascend310_infer/build.sh
+++ b/research/cv/STGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/SiamFC/ascend310_infer/build.sh b/research/cv/SiamFC/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/SiamFC/ascend310_infer/build.sh
+++ b/research/cv/SiamFC/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/SinGAN/ascend310_infer/build.sh b/research/cv/SinGAN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/SinGAN/ascend310_infer/build.sh
+++ b/research/cv/SinGAN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/StackedHourglass/ascend310_infer/build.sh b/research/cv/StackedHourglass/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/StackedHourglass/ascend310_infer/build.sh
+++ b/research/cv/StackedHourglass/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/StarGAN/ascend310_infer/src/build.sh b/research/cv/StarGAN/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/StarGAN/ascend310_infer/src/build.sh
+++ b/research/cv/StarGAN/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/TCN/ascend310_infer/build.sh b/research/cv/TCN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/TCN/ascend310_infer/build.sh
+++ b/research/cv/TCN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/TNT/ascend310_infer/build.sh b/research/cv/TNT/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/TNT/ascend310_infer/build.sh
+++ b/research/cv/TNT/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/U-GAT-IT/ascend310_infer/build.sh b/research/cv/U-GAT-IT/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/U-GAT-IT/ascend310_infer/build.sh
+++ b/research/cv/U-GAT-IT/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/UNet3+/ascend310_infer/build.sh b/research/cv/UNet3+/ascend310_infer/build.sh
index d95d735d4d4fb2bfed3cd7f3df1beae6676ddf4d..a253ca1cd5d47d70f464340cdefd6bce21d681be 100644
--- a/research/cv/UNet3+/ascend310_infer/build.sh
+++ b/research/cv/UNet3+/ascend310_infer/build.sh
@@ -18,7 +18,10 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/VehicleNet/ascend310_infer/build.sh b/research/cv/VehicleNet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/VehicleNet/ascend310_infer/build.sh
+++ b/research/cv/VehicleNet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/advanced_east/ascend310_infer/build.sh b/research/cv/advanced_east/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/advanced_east/ascend310_infer/build.sh
+++ b/research/cv/advanced_east/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/arcface/ascend_310_infer/build.sh b/research/cv/arcface/ascend_310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/arcface/ascend_310_infer/build.sh
+++ b/research/cv/arcface/ascend_310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/autoaugment/ascend310_infer/build.sh b/research/cv/autoaugment/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/autoaugment/ascend310_infer/build.sh
+++ b/research/cv/autoaugment/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/cait/ascend310_infer/build.sh b/research/cv/cait/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/cait/ascend310_infer/build.sh
+++ b/research/cv/cait/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/cct/ascend310_infer/build.sh b/research/cv/cct/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/cct/ascend310_infer/build.sh
+++ b/research/cv/cct/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/centernet_det/ascend310_infer/build.sh b/research/cv/centernet_det/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/centernet_det/ascend310_infer/build.sh
+++ b/research/cv/centernet_det/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/centernet_resnet101/ascend310_infer/build.sh b/research/cv/centernet_resnet101/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/centernet_resnet101/ascend310_infer/build.sh
+++ b/research/cv/centernet_resnet101/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/centernet_resnet50_v1/ascend310_infer/build.sh b/research/cv/centernet_resnet50_v1/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/centernet_resnet50_v1/ascend310_infer/build.sh
+++ b/research/cv/centernet_resnet50_v1/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/dcgan/ascend310_infer/build.sh b/research/cv/dcgan/ascend310_infer/build.sh
index d803d4a1683240601d3028de2aba2ef4640af460..b99670829c4b114bfcc9d84e60d24af1ea64f644 100644
--- a/research/cv/dcgan/ascend310_infer/build.sh
+++ b/research/cv/dcgan/ascend310_infer/build.sh
@@ -17,6 +17,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/dcgan/gpu_infer/build.sh b/research/cv/dcgan/gpu_infer/build.sh
index cad23b6251e7cbe6bc7635b740626dd920c3963a..5e921dbd3bb36cff85a19504f818d2a6c5095632 100644
--- a/research/cv/dcgan/gpu_infer/build.sh
+++ b/research/cv/dcgan/gpu_infer/build.sh
@@ -23,6 +23,10 @@ cd out || exit
if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-gpu | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
-make
\ No newline at end of file
+
+MINDSPORE_PATH="`pip show mindspore-gpu | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
+make
diff --git a/research/cv/dcrnn/ascend_310_infer/build.sh b/research/cv/dcrnn/ascend_310_infer/build.sh
index 6685838b5e025b1090d135daa12dcbfbfaefd15f..3ed11905334092ecc1d5fa4c56274d51559c2e83 100644
--- a/research/cv/dcrnn/ascend_310_infer/build.sh
+++ b/research/cv/dcrnn/ascend_310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/deeplabv3plus/ascend310_infer/build.sh b/research/cv/deeplabv3plus/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/deeplabv3plus/ascend310_infer/build.sh
+++ b/research/cv/deeplabv3plus/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/delf/ascend310_infer/build.sh b/research/cv/delf/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100755
--- a/research/cv/delf/ascend310_infer/build.sh
+++ b/research/cv/delf/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/dlinknet/ascend310_infer/src/build.sh b/research/cv/dlinknet/ascend310_infer/src/build.sh
index e23a54e5aa943a734affaccc3c52910173c63198..f3e9675c6c208090cd45745be513a986d8f730f0 100644
--- a/research/cv/dlinknet/ascend310_infer/src/build.sh
+++ b/research/cv/dlinknet/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/ecolite/ascend310_infer/build.sh b/research/cv/ecolite/ascend310_infer/build.sh
index ce42b350ee7c55402425380af96e824e2a8fa28b..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/ecolite/ascend310_infer/build.sh
+++ b/research/cv/ecolite/ascend310_infer/build.sh
@@ -25,5 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/efficientnet-b0/ascend310_infer/build.sh b/research/cv/efficientnet-b0/ascend310_infer/build.sh
index 32ff98d8f5270f34e6470c7cbab7eb47a4aac8ab..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/efficientnet-b0/ascend310_infer/build.sh
+++ b/research/cv/efficientnet-b0/ascend310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/efficientnet-b1/ascend310_infer/src/build.sh b/research/cv/efficientnet-b1/ascend310_infer/src/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/research/cv/efficientnet-b1/ascend310_infer/src/build.sh
+++ b/research/cv/efficientnet-b1/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/efficientnet-b2/ascend310_infer/build.sh b/research/cv/efficientnet-b2/ascend310_infer/build.sh
index 32ff98d8f5270f34e6470c7cbab7eb47a4aac8ab..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/efficientnet-b2/ascend310_infer/build.sh
+++ b/research/cv/efficientnet-b2/ascend310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/efficientnet-b3/ascend310_infer/build.sh b/research/cv/efficientnet-b3/ascend310_infer/build.sh
index 32ff98d8f5270f34e6470c7cbab7eb47a4aac8ab..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/efficientnet-b3/ascend310_infer/build.sh
+++ b/research/cv/efficientnet-b3/ascend310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/efficientnetv2/ascend310_infer/build.sh b/research/cv/efficientnetv2/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/efficientnetv2/ascend310_infer/build.sh
+++ b/research/cv/efficientnetv2/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/faceboxes/ascend310_infer/build.sh b/research/cv/faceboxes/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/faceboxes/ascend310_infer/build.sh
+++ b/research/cv/faceboxes/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/fishnet99/ascend310_infer/src/build.sh b/research/cv/fishnet99/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/fishnet99/ascend310_infer/src/build.sh
+++ b/research/cv/fishnet99/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/gan/ascend310_infer/build.sh b/research/cv/gan/ascend310_infer/build.sh
index cc2fc922cd7c6fd9b06e14a30bff891774273445..d66c193799a2510d5ef571fc61a362a6aa78febb 100644
--- a/research/cv/gan/ascend310_infer/build.sh
+++ b/research/cv/gan/ascend310_infer/build.sh
@@ -17,6 +17,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ghostnet/ascend310_infer/src/build.sh b/research/cv/ghostnet/ascend310_infer/src/build.sh
index 580828e1cd2240bc4ac6178d60a628e2ff931dd3..f08962167ef70a8e1436e53ce21bc276cafc35cb 100644
--- a/research/cv/ghostnet/ascend310_infer/src/build.sh
+++ b/research/cv/ghostnet/ascend310_infer/src/build.sh
@@ -15,5 +15,9 @@
# ============================================================================
# shellcheck disable=SC2006
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/hardnet/ascend310_infer/build.sh b/research/cv/hardnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/hardnet/ascend310_infer/build.sh
+++ b/research/cv/hardnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/hed/ascend310_infer/build.sh b/research/cv/hed/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/hed/ascend310_infer/build.sh
+++ b/research/cv/hed/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ibnnet/ascend310_infer/build.sh b/research/cv/ibnnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/ibnnet/ascend310_infer/build.sh
+++ b/research/cv/ibnnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/inception_resnet_v2/ascend310_infer/build.sh b/research/cv/inception_resnet_v2/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/inception_resnet_v2/ascend310_infer/build.sh
+++ b/research/cv/inception_resnet_v2/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/meta-baseline/ascend310_infer/build.sh b/research/cv/meta-baseline/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/meta-baseline/ascend310_infer/build.sh
+++ b/research/cv/meta-baseline/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/metric_learn/ascend310_infer/src/build.sh b/research/cv/metric_learn/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/metric_learn/ascend310_infer/src/build.sh
+++ b/research/cv/metric_learn/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/midas/ascend310_infer/build.sh b/research/cv/midas/ascend310_infer/build.sh
index 2fc7044657c4101bda4d7fadc4a4530f00d9be0c..ad57f880023e0665197b3102f9a31979c8d456bc 100644
--- a/research/cv/midas/ascend310_infer/build.sh
+++ b/research/cv/midas/ascend310_infer/build.sh
@@ -13,5 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/mnasnet/ascend310_infer/build.sh b/research/cv/mnasnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/mnasnet/ascend310_infer/build.sh
+++ b/research/cv/mnasnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/mobilenetV3_small_x1_0/ascend310_infer/build.sh b/research/cv/mobilenetV3_small_x1_0/ascend310_infer/build.sh
index 32ff98d8f5270f34e6470c7cbab7eb47a4aac8ab..4bd4b8915cbbae903e4e41d4557363fe9863d1c0 100644
--- a/research/cv/mobilenetV3_small_x1_0/ascend310_infer/build.sh
+++ b/research/cv/mobilenetV3_small_x1_0/ascend310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/mobilenetv3_large/ascend310_infer/build.sh b/research/cv/mobilenetv3_large/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/mobilenetv3_large/ascend310_infer/build.sh
+++ b/research/cv/mobilenetv3_large/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/nas-fpn/ascend310_infer/build.sh b/research/cv/nas-fpn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/nas-fpn/ascend310_infer/build.sh
+++ b/research/cv/nas-fpn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/nnUNet/ascend310_infer/build.sh b/research/cv/nnUNet/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/nnUNet/ascend310_infer/build.sh
+++ b/research/cv/nnUNet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ntsnet/ascend310_infer/build.sh b/research/cv/ntsnet/ascend310_infer/build.sh
index 07d642b99d60c459ca05bfbdc805bc862329207b..d66c193799a2510d5ef571fc61a362a6aa78febb 100644
--- a/research/cv/ntsnet/ascend310_infer/build.sh
+++ b/research/cv/ntsnet/ascend310_infer/build.sh
@@ -17,6 +17,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/osnet/ascend310_infer/build.sh b/research/cv/osnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/osnet/ascend310_infer/build.sh
+++ b/research/cv/osnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/pcb/ascend310_infer/build.sh b/research/cv/pcb/ascend310_infer/build.sh
index d8b0bae914799f0effc0360fe0b0e47d0bed51cc..1258f1e3435d5084024171f166f95ab4328b8251 100644
--- a/research/cv/pcb/ascend310_infer/build.sh
+++ b/research/cv/pcb/ascend310_infer/build.sh
@@ -19,6 +19,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/pnasnet/ascend310_infer/build.sh b/research/cv/pnasnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/pnasnet/ascend310_infer/build.sh
+++ b/research/cv/pnasnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/pointnet/ascend310_infer/build.sh b/research/cv/pointnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/pointnet/ascend310_infer/build.sh
+++ b/research/cv/pointnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/pointpillars/ascend310_infer/build.sh b/research/cv/pointpillars/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/pointpillars/ascend310_infer/build.sh
+++ b/research/cv/pointpillars/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/proxylessnas/ascend310_infer/build.sh b/research/cv/proxylessnas/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/proxylessnas/ascend310_infer/build.sh
+++ b/research/cv/proxylessnas/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/r2plus1d/ascend310_infer/build.sh b/research/cv/r2plus1d/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/r2plus1d/ascend310_infer/build.sh
+++ b/research/cv/r2plus1d/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ras/ascend310_infer/build.sh b/research/cv/ras/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/ras/ascend310_infer/build.sh
+++ b/research/cv/ras/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/relationnet/ascend310_infer/build.sh b/research/cv/relationnet/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/relationnet/ascend310_infer/build.sh
+++ b/research/cv/relationnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/repvgg/ascend310_infer/build.sh b/research/cv/repvgg/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/repvgg/ascend310_infer/build.sh
+++ b/research/cv/repvgg/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/res2net/ascend310_infer/build.sh b/research/cv/res2net/ascend310_infer/build.sh
index 7571e9c03ff03aa3bc523d70969082ce19d1253b..6dda637c448de42760a605dc7f569f1d2aee419a 100644
--- a/research/cv/res2net/ascend310_infer/build.sh
+++ b/research/cv/res2net/ascend310_infer/build.sh
@@ -24,7 +24,10 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/res2net_deeplabv3/ascend310_infer/build.sh b/research/cv/res2net_deeplabv3/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/res2net_deeplabv3/ascend310_infer/build.sh
+++ b/research/cv/res2net_deeplabv3/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/res2net_faster_rcnn/ascend310_infer/build.sh b/research/cv/res2net_faster_rcnn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/res2net_faster_rcnn/ascend310_infer/build.sh
+++ b/research/cv/res2net_faster_rcnn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/res2net_yolov3/ascend310_infer/build.sh b/research/cv/res2net_yolov3/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/res2net_yolov3/ascend310_infer/build.sh
+++ b/research/cv/res2net_yolov3/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/resnet3d/ascend310_infer/build.sh b/research/cv/resnet3d/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/resnet3d/ascend310_infer/build.sh
+++ b/research/cv/resnet3d/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/resnet50_bam/ascend310_infer/src/build.sh b/research/cv/resnet50_bam/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/resnet50_bam/ascend310_infer/src/build.sh
+++ b/research/cv/resnet50_bam/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/resnetv2/ascend310_infer/build.sh b/research/cv/resnetv2/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/resnetv2/ascend310_infer/build.sh
+++ b/research/cv/resnetv2/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/resnetv2_50_frn/ascend310_infer/build.sh b/research/cv/resnetv2_50_frn/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/resnetv2_50_frn/ascend310_infer/build.sh
+++ b/research/cv/resnetv2_50_frn/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/resnext152_64x4d/ascend310_infer/src/build.sh b/research/cv/resnext152_64x4d/ascend310_infer/src/build.sh
index 5a080d25962cd55f8f49ef71fe948833b2e3660d..0b4eb0979118c2de66542f42e41dd809ef47f5b2 100644
--- a/research/cv/resnext152_64x4d/ascend310_infer/src/build.sh
+++ b/research/cv/resnext152_64x4d/ascend310_infer/src/build.sh
@@ -13,5 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/retinaface/ascend310_infer/build.sh b/research/cv/retinaface/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/retinaface/ascend310_infer/build.sh
+++ b/research/cv/retinaface/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/retinanet_resnet101/ascend310_infer/build.sh b/research/cv/retinanet_resnet101/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/retinanet_resnet101/ascend310_infer/build.sh
+++ b/research/cv/retinanet_resnet101/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/retinanet_resnet152/ascend310_infer/build.sh b/research/cv/retinanet_resnet152/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/retinanet_resnet152/ascend310_infer/build.sh
+++ b/research/cv/retinanet_resnet152/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/siamRPN/ascend_310_infer/build.sh b/research/cv/siamRPN/ascend_310_infer/build.sh
index 3a30e3ec7b93428579bb58003a422e4e43f14a27..26f41589fa8a4915d757e47c05e0659da11f47cf 100644
--- a/research/cv/siamRPN/ascend_310_infer/build.sh
+++ b/research/cv/siamRPN/ascend_310_infer/build.sh
@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/simple_baselines/ascend310_infer/build.sh b/research/cv/simple_baselines/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/simple_baselines/ascend310_infer/build.sh
+++ b/research/cv/simple_baselines/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/single_path_nas/ascend310_infer/src/build.sh b/research/cv/single_path_nas/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/single_path_nas/ascend310_infer/src/build.sh
+++ b/research/cv/single_path_nas/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/sknet/ascend310_infer/build.sh b/research/cv/sknet/ascend310_infer/build.sh
index a3afcf5a1393c68f1f2b8cb661507f24d9856c89..b75736515f450a7e32993f3bc31cb4a4337a81ea 100644
--- a/research/cv/sknet/ascend310_infer/build.sh
+++ b/research/cv/sknet/ascend310_infer/build.sh
@@ -24,5 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/slowfast/ascend_310_infer/build.sh b/research/cv/slowfast/ascend_310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/cv/slowfast/ascend_310_infer/build.sh
+++ b/research/cv/slowfast/ascend_310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/squeezenet1_1/ascend310_infer/build.sh b/research/cv/squeezenet1_1/ascend310_infer/build.sh
index abcb999930ca5d62345b204d7fcfe4e097e8f0bb..a692e538500d5ccba671089ccc421a819a0e97d9 100644
--- a/research/cv/squeezenet1_1/ascend310_infer/build.sh
+++ b/research/cv/squeezenet1_1/ascend310_infer/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ssd_ghostnet/ascend310_infer/build.sh b/research/cv/ssd_ghostnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/ssd_ghostnet/ascend310_infer/build.sh
+++ b/research/cv/ssd_ghostnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ssd_inceptionv2/ascend310_infer/build.sh b/research/cv/ssd_inceptionv2/ascend310_infer/build.sh
index 3b480d9b2ecb4c24790e9350adad980ef75f86d8..4a3771ca03f6efd945cd66fd70511e2effdfb2e0 100644
--- a/research/cv/ssd_inceptionv2/ascend310_infer/build.sh
+++ b/research/cv/ssd_inceptionv2/ascend310_infer/build.sh
@@ -25,6 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ssd_mobilenetV2/ascend310_infer/build.sh b/research/cv/ssd_mobilenetV2/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/ssd_mobilenetV2/ascend310_infer/build.sh
+++ b/research/cv/ssd_mobilenetV2/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ssd_mobilenetV2_FPNlite/ascend310_infer/build.sh b/research/cv/ssd_mobilenetV2_FPNlite/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/ssd_mobilenetV2_FPNlite/ascend310_infer/build.sh
+++ b/research/cv/ssd_mobilenetV2_FPNlite/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/ssd_resnet34/ascend310_infer/build.sh b/research/cv/ssd_resnet34/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/research/cv/ssd_resnet34/ascend310_infer/build.sh
+++ b/research/cv/ssd_resnet34/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/ssd_resnet50/ascend310_infer/build.sh b/research/cv/ssd_resnet50/ascend310_infer/build.sh
index f7594032591a65d6c70e484b302da1bf542b524b..bcc55e1ce156bbf2a57ea823a7638a0ed88b1384 100644
--- a/research/cv/ssd_resnet50/ascend310_infer/build.sh
+++ b/research/cv/ssd_resnet50/ascend310_infer/build.sh
@@ -23,6 +23,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/stgcn/ascend310_infer/build.sh b/research/cv/stgcn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/stgcn/ascend310_infer/build.sh
+++ b/research/cv/stgcn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/stpm/ascend_310_infer/build.sh b/research/cv/stpm/ascend_310_infer/build.sh
index d413cae68c6a4829d41874a41957e88f9ea96454..3ed11905334092ecc1d5fa4c56274d51559c2e83 100644
--- a/research/cv/stpm/ascend_310_infer/build.sh
+++ b/research/cv/stpm/ascend_310_infer/build.sh
@@ -25,5 +25,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/swin_transformer/ascend310_infer/build.sh b/research/cv/swin_transformer/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/swin_transformer/ascend310_infer/build.sh
+++ b/research/cv/swin_transformer/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/tall/ascend310_infer/build.sh b/research/cv/tall/ascend310_infer/build.sh
index 163be8004fe9f6a650890d02fb3d8127bb75afd3..9ed3897503f8663dd4b9d7e2380338a7b8b22d0e 100644
--- a/research/cv/tall/ascend310_infer/build.sh
+++ b/research/cv/tall/ascend310_infer/build.sh
@@ -24,7 +24,10 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/textfusenet/ascend310_infer/build.sh b/research/cv/textfusenet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100755
--- a/research/cv/textfusenet/ascend310_infer/build.sh
+++ b/research/cv/textfusenet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/tgcn/ascend310_infer/build.sh b/research/cv/tgcn/ascend310_infer/build.sh
index a5c39b733a4d23c2952ed0d9f26504ae364bf528..23765cadd40c025fb07566ff9b79b314f8650d8d 100644
--- a/research/cv/tgcn/ascend310_infer/build.sh
+++ b/research/cv/tgcn/ascend310_infer/build.sh
@@ -26,6 +26,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/tsm/ascend310_infer/build.sh b/research/cv/tsm/ascend310_infer/build.sh
index d803d4a1683240601d3028de2aba2ef4640af460..b99670829c4b114bfcc9d84e60d24af1ea64f644 100644
--- a/research/cv/tsm/ascend310_infer/build.sh
+++ b/research/cv/tsm/ascend310_infer/build.sh
@@ -17,6 +17,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/tsn/ascend310_infer/build.sh b/research/cv/tsn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/tsn/ascend310_infer/build.sh
+++ b/research/cv/tsn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/u2net/ascend310_infer/build.sh b/research/cv/u2net/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/u2net/ascend310_infer/build.sh
+++ b/research/cv/u2net/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/vgg19/ascend310_infer/build.sh b/research/cv/vgg19/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/vgg19/ascend310_infer/build.sh
+++ b/research/cv/vgg19/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/vit_base/ascend310_infer/build.sh b/research/cv/vit_base/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/vit_base/ascend310_infer/build.sh
+++ b/research/cv/vit_base/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/vnet/ascend310_infer/src/build.sh b/research/cv/vnet/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/vnet/ascend310_infer/src/build.sh
+++ b/research/cv/vnet/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/wdsr/ascend310_infer/build.sh b/research/cv/wdsr/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cv/wdsr/ascend310_infer/build.sh
+++ b/research/cv/wdsr/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/wgan/ascend310_infer/build.sh b/research/cv/wgan/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/wgan/ascend310_infer/build.sh
+++ b/research/cv/wgan/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/wideresnet/ascend310_infer/src/build.sh b/research/cv/wideresnet/ascend310_infer/src/build.sh
index 724c787b3646000019ded20c52854b2039cf295b..c227713238b74364084e21cb9109b6d7da726ef3 100644
--- a/research/cv/wideresnet/ascend310_infer/src/build.sh
+++ b/research/cv/wideresnet/ascend310_infer/src/build.sh
@@ -14,5 +14,9 @@
# limitations under the License.
# ============================================================================
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cv/yolov3_tiny/ascend310_infer/build.sh b/research/cv/yolov3_tiny/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cv/yolov3_tiny/ascend310_infer/build.sh
+++ b/research/cv/yolov3_tiny/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cv/yolox/ascend310_infer/build.sh b/research/cv/yolox/ascend310_infer/build.sh
index b4bcbb09f799adab5fdbd3596658817f3eb6632b..692c6a3a94ce3dedf723436a0bce4399eac5e17d 100644
--- a/research/cv/yolox/ascend310_infer/build.sh
+++ b/research/cv/yolox/ascend310_infer/build.sh
@@ -17,6 +17,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/cvtmodel/densenet/ascend310_infer/build.sh b/research/cvtmodel/densenet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cvtmodel/densenet/ascend310_infer/build.sh
+++ b/research/cvtmodel/densenet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cvtmodel/hrnet/ascend310_infer/build.sh b/research/cvtmodel/hrnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cvtmodel/hrnet/ascend310_infer/build.sh
+++ b/research/cvtmodel/hrnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cvtmodel/regnet/ascend310_infer/build.sh b/research/cvtmodel/regnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cvtmodel/regnet/ascend310_infer/build.sh
+++ b/research/cvtmodel/regnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cvtmodel/resnest/ascend310_infer/build.sh b/research/cvtmodel/resnest/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cvtmodel/resnest/ascend310_infer/build.sh
+++ b/research/cvtmodel/resnest/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cvtmodel/resnet_ipl/ascend310_infer/build.sh b/research/cvtmodel/resnet_ipl/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cvtmodel/resnet_ipl/ascend310_infer/build.sh
+++ b/research/cvtmodel/resnet_ipl/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cvtmodel/vgg/ascend310_infer/build.sh b/research/cvtmodel/vgg/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/cvtmodel/vgg/ascend310_infer/build.sh
+++ b/research/cvtmodel/vgg/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/cvtmodel/wide_resnet/ascend310_infer/build.sh b/research/cvtmodel/wide_resnet/ascend310_infer/build.sh
index 770a8851efade7f352039fc8665d307ae1abbb00..a19f436261325992344f151ef133ec1eab72f877 100644
--- a/research/cvtmodel/wide_resnet/ascend310_infer/build.sh
+++ b/research/cvtmodel/wide_resnet/ascend310_infer/build.sh
@@ -18,6 +18,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/gnn/dgcn/ascend310_infer/build.sh b/research/gnn/dgcn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/gnn/dgcn/ascend310_infer/build.sh
+++ b/research/gnn/dgcn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/gnn/sdne/ascend310_infer/build.sh b/research/gnn/sdne/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/gnn/sdne/ascend310_infer/build.sh
+++ b/research/gnn/sdne/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/gnn/sgcn/ascend310_infer/build.sh b/research/gnn/sgcn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/gnn/sgcn/ascend310_infer/build.sh
+++ b/research/gnn/sgcn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/hpc/molecular_dynamics/ascend310_infer/build.sh b/research/hpc/molecular_dynamics/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/hpc/molecular_dynamics/ascend310_infer/build.sh
+++ b/research/hpc/molecular_dynamics/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/albert/ascend310_infer/build.sh b/research/nlp/albert/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/research/nlp/albert/ascend310_infer/build.sh
+++ b/research/nlp/albert/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/nlp/atae_lstm/ascend310_infer/build.sh b/research/nlp/atae_lstm/ascend310_infer/build.sh
index c7aac7196661fcfa50c3de063336355bf3831286..0b4187769497ff2b22041d3cf8e4dc90cc443bfa 100644
--- a/research/nlp/atae_lstm/ascend310_infer/build.sh
+++ b/research/nlp/atae_lstm/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
\ No newline at end of file
diff --git a/research/nlp/dam/ascend310_infer/build.sh b/research/nlp/dam/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/nlp/dam/ascend310_infer/build.sh
+++ b/research/nlp/dam/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/hypertext/ascend310_infer/build.sh b/research/nlp/hypertext/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/nlp/hypertext/ascend310_infer/build.sh
+++ b/research/nlp/hypertext/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/ktnet/ascend310_infer/build.sh b/research/nlp/ktnet/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/nlp/ktnet/ascend310_infer/build.sh
+++ b/research/nlp/ktnet/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/rotate/ascend310_infer/build.sh b/research/nlp/rotate/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/nlp/rotate/ascend310_infer/build.sh
+++ b/research/nlp/rotate/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/senta/ascend310_infer/build.sh b/research/nlp/senta/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/nlp/senta/ascend310_infer/build.sh
+++ b/research/nlp/senta/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/soft_masked_bert/ascend310_infer/build.sh b/research/nlp/soft_masked_bert/ascend310_infer/build.sh
index 1a910fac327121991d9eded00c99f565ff43da36..678a81ec24e066667d9217882b02a8f1d1eaceb7 100644
--- a/research/nlp/soft_masked_bert/ascend310_infer/build.sh
+++ b/research/nlp/soft_masked_bert/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake . \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/speech_transformer/ascend310_infer/build.sh b/research/nlp/speech_transformer/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/nlp/speech_transformer/ascend310_infer/build.sh
+++ b/research/nlp/speech_transformer/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/ternarybert/ascend310_infer/build.sh b/research/nlp/ternarybert/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/nlp/ternarybert/ascend310_infer/build.sh
+++ b/research/nlp/ternarybert/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/textrcnn/ascend310_infer/build.sh b/research/nlp/textrcnn/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/nlp/textrcnn/ascend310_infer/build.sh
+++ b/research/nlp/textrcnn/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/nlp/transformer_xl/ascend310_infer/build.sh b/research/nlp/transformer_xl/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/nlp/transformer_xl/ascend310_infer/build.sh
+++ b/research/nlp/transformer_xl/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/recommend/DIEN/ascend310_infer/build.sh b/research/recommend/DIEN/ascend310_infer/build.sh
index 1b12c95a194da6a7116780a39c058e3c2a228acf..306d59dc1c5a0ce9ba7c05d1b80d0faf1ff98efb 100644
--- a/research/recommend/DIEN/ascend310_infer/build.sh
+++ b/research/recommend/DIEN/ascend310_infer/build.sh
@@ -17,5 +17,9 @@ if [ ! -d out ]; then
mkdir out
fi
cd out || exit
-cmake .. -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/recommend/EDCN/ascend310_infer/build.sh b/research/recommend/EDCN/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/recommend/EDCN/ascend310_infer/build.sh
+++ b/research/recommend/EDCN/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/recommend/Fat-DeepFFM/ascend310/build.sh b/research/recommend/Fat-DeepFFM/ascend310/build.sh
index abe392474b5422c8cb9245a9282f246db7ed4845..59d6fae86cb63ed806f8a446b85f49f3681cea2f 100644
--- a/research/recommend/Fat-DeepFFM/ascend310/build.sh
+++ b/research/recommend/Fat-DeepFFM/ascend310/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/recommend/autodis/ascend310_infer/build.sh b/research/recommend/autodis/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/recommend/autodis/ascend310_infer/build.sh
+++ b/research/recommend/autodis/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/recommend/dlrm/ascend310_infer/build.sh b/research/recommend/dlrm/ascend310_infer/build.sh
index 713d7f657ddfa5f75b069351c55f8447f77c72d0..1826a5da7cc50cb20fb3c4be0e630485f7785106 100644
--- a/research/recommend/dlrm/ascend310_infer/build.sh
+++ b/research/recommend/dlrm/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/recommend/final/ascend310_infer/build.sh b/research/recommend/final/ascend310_infer/build.sh
index e429f3859b6cfd1f606608c9465ec90cecb20535..528ac785726d25ad042384758df2eb725c7fb7a1 100644
--- a/research/recommend/final/ascend310_infer/build.sh
+++ b/research/recommend/final/ascend310_infer/build.sh
@@ -24,6 +24,9 @@ if [ -f "Makefile" ]; then
make clean
fi
-cmake .. \
- -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake .. -DMINDSPORE_PATH=$MINDSPORE_PATH
make
diff --git a/research/recommend/mmoe/ascend310_infer/src/build.sh b/research/recommend/mmoe/ascend310_infer/src/build.sh
index 580828e1cd2240bc4ac6178d60a628e2ff931dd3..f08962167ef70a8e1436e53ce21bc276cafc35cb 100644
--- a/research/recommend/mmoe/ascend310_infer/src/build.sh
+++ b/research/recommend/mmoe/ascend310_infer/src/build.sh
@@ -15,5 +15,9 @@
# ============================================================================
# shellcheck disable=SC2006
-cmake . -DMINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+MINDSPORE_PATH="`pip show mindspore-ascend | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+if [[ ! $MINDSPORE_PATH ]];then
+ MINDSPORE_PATH="`pip show mindspore | grep Location | awk '{print $2"/mindspore"}' | xargs realpath`"
+fi
+cmake . -DMINDSPORE_PATH=$MINDSPORE_PATH
make