Skip to content

Commit 966829d

Browse files
authored
Merge pull request #12166 from luotao1/fix_demo
fix simple_on_word2vec fails on Manylinux1
2 parents 7c5e6d2 + d1b5f56 commit 966829d

File tree

1 file changed

+12
-9
lines changed
  • paddle/contrib/inference/demo_ci

1 file changed

+12
-9
lines changed

paddle/contrib/inference/demo_ci/run.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,18 @@ for WITH_STATIC_LIB in ON OFF; do
4444
-DWITH_GPU=$TEST_GPU_CPU \
4545
-DWITH_STATIC_LIB=$WITH_STATIC_LIB
4646
make -j
47-
for use_gpu in $use_gpu_list; do
48-
./simple_on_word2vec \
49-
--dirname=${PADDLE_ROOT}/build/python/paddle/fluid/tests/book/word2vec.inference.model \
50-
--use_gpu=$use_gpu
51-
if [ $? -ne 0 ]; then
52-
echo "simple_on_word2vec demo runs fail."
53-
exit 1
54-
fi
55-
done
47+
word2vec_model=${PADDLE_ROOT}'/build/python/paddle/fluid/tests/book/word2vec.inference.model'
48+
if [ -d $word2vec_model ]; then
49+
for use_gpu in $use_gpu_list; do
50+
./simple_on_word2vec \
51+
--dirname=$word2vec_model \
52+
--use_gpu=$use_gpu
53+
if [ $? -ne 0 ]; then
54+
echo "simple_on_word2vec demo runs fail."
55+
exit 1
56+
fi
57+
done
58+
fi
5659
# ---------vis_demo---------
5760
rm -rf *
5861
cmake .. -DPADDLE_LIB=${PADDLE_ROOT}/build/fluid_install_dir/ \

0 commit comments

Comments
 (0)