forked from PaddlePaddle/Paddle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request PaddlePaddle#99 from jiweibo/model_update
update cuda_linux_demo's 1.8 model to 2.0
- Loading branch information
Showing
6 changed files
with
88 additions
and
229 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
set +x | ||
set -e | ||
|
||
work_path=$(dirname $(readlink -f $0)) | ||
|
||
# 1. check paddle_inference exists | ||
if [ ! -d "${work_path}/../lib/paddle_inference" ]; then | ||
echo "Please download paddle_inference lib and move it in Paddle-Inference-Demo/lib" | ||
exit 1 | ||
fi | ||
|
||
# 2. check CMakeLists exists | ||
if [ ! -f "${work_path}/CMakeLists.txt" ]; then | ||
cp -a "${work_path}/../lib/CMakeLists.txt" "${work_path}/" | ||
fi | ||
|
||
# 3. compile | ||
mkdir -p build | ||
cd build | ||
rm -rf * | ||
|
||
# same with the model_test.cc | ||
DEMO_NAME=model_test | ||
|
||
WITH_MKL=ON | ||
WITH_GPU=ON | ||
USE_TENSORRT=ON | ||
|
||
LIB_DIR=${work_path}/../lib/paddle_inference | ||
CUDNN_LIB=/usr/lib/x86_64-linux-gnu/ | ||
CUDA_LIB=/usr/local/cuda/lib64 | ||
TENSORRT_ROOT=/usr/local/TensorRT-7.0.0.11 | ||
|
||
cmake .. -DPADDLE_LIB=${LIB_DIR} \ | ||
-DWITH_MKL=${WITH_MKL} \ | ||
-DDEMO_NAME=${DEMO_NAME} \ | ||
-DWITH_GPU=${WITH_GPU} \ | ||
-DWITH_STATIC_LIB=OFF \ | ||
-DUSE_TENSORRT=${USE_TENSORRT} \ | ||
-DCUDNN_LIB=${CUDNN_LIB} \ | ||
-DCUDA_LIB=${CUDA_LIB} \ | ||
-DTENSORRT_ROOT=${TENSORRT_ROOT} | ||
|
||
make -j |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set +x | ||
set -e | ||
|
||
work_path=$(dirname $(readlink -f $0)) | ||
|
||
# 1. compile | ||
bash ${work_path}/compile.sh | ||
|
||
# 2. download model | ||
if [ ! -d mobilenetv1 ]; then | ||
wget https://paddle-inference-dist.bj.bcebos.com/Paddle-Inference-Demo/mobilenetv1.tgz | ||
tar xzf mobilenetv1.tgz | ||
fi | ||
|
||
# 3. run | ||
./build/model_test --model_file mobilenetv1/inference.pdmodel --params_file mobilenetv1/inference.pdiparams |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters