From ddd8740a7b868e0496f4dae33f502b4585e58143 Mon Sep 17 00:00:00 2001 From: wangxinxin08 <69842442+wangxinxin08@users.noreply.github.com> Date: Wed, 23 Nov 2022 17:53:47 +0800 Subject: [PATCH] fix version of Paddle-TRT needed by ppyoloe_r (#7390) --- configs/rotate/ppyoloe_r/README.md | 4 ++-- configs/rotate/ppyoloe_r/README_en.md | 4 ++-- configs/rotate/tools/inference_benchmark.py | 7 ++++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/configs/rotate/ppyoloe_r/README.md b/configs/rotate/ppyoloe_r/README.md index 0109177d5..c709fec6f 100644 --- a/configs/rotate/ppyoloe_r/README.md +++ b/configs/rotate/ppyoloe_r/README.md @@ -82,7 +82,7 @@ zip -r submit.zip submit ``` ### 速度测试 -可以使用Paddle模式或者Paddle-TRT模式进行测速。当使用Paddle-TRT模式测速时,需要确保**TensorRT版本大于8.2, PaddlePaddle版本大于2.4.0rc0**。使用Paddle-TRT进行测速,可以执行以下命令: +可以使用Paddle模式或者Paddle-TRT模式进行测速。当使用Paddle-TRT模式测速时,需要确保**TensorRT版本大于8.2, PaddlePaddle版本为develop版本**。使用Paddle-TRT进行测速,可以执行以下命令: ``` bash # 导出模型 @@ -121,7 +121,7 @@ python deploy/python/infer.py --image_file demo/P0072__1.0__0___0.png --model_di ``` **注意:** -- 使用Paddle-TRT使用确保**PaddlePaddle版本大于2.4.0rc且TensorRT版本大于8.2**. +- 使用Paddle-TRT使用确保**PaddlePaddle版本为develop版本且TensorRT版本大于8.2**. ## 附录 diff --git a/configs/rotate/ppyoloe_r/README_en.md b/configs/rotate/ppyoloe_r/README_en.md index df51d49d9..3301bf806 100644 --- a/configs/rotate/ppyoloe_r/README_en.md +++ b/configs/rotate/ppyoloe_r/README_en.md @@ -83,7 +83,7 @@ zip -r submit.zip submit ### Speed testing -You can use Paddle mode or Paddle-TRT mode for speed testing. When using Paddle-TRT for speed testing, make sure that **the version of TensorRT is larger than 8.2 and the version of PaddlePaddle is larger than 2.4.0rc**. Using Paddle-TRT to test speed, run following command +You can use Paddle mode or Paddle-TRT mode for speed testing. When using Paddle-TRT for speed testing, make sure that **the version of TensorRT is larger than 8.2 and the version of PaddlePaddle is the develop version**. Using Paddle-TRT to test speed, run following command ``` bash # export inference model @@ -124,7 +124,7 @@ python tools/export_model.py -c configs/rotate/ppyoloe_r/ppyoloe_r_crn_l_3x_dota python deploy/python/infer.py --image_file demo/P0072__1.0__0___0.png --model_dir=output_inference/ppyoloe_r_crn_l_3x_dota --run_mode=trt_fp16 --device=gpu ``` **Notes:** -- When using Paddle-TRT for speed testing, make sure that **the version of TensorRT is larger than 8.2 and the version of PaddlePaddle is larger than 2.4.0rc** +- When using Paddle-TRT for speed testing, make sure that **the version of TensorRT is larger than 8.2 and the version of PaddlePaddle is the develop version** ## Appendix diff --git a/configs/rotate/tools/inference_benchmark.py b/configs/rotate/tools/inference_benchmark.py index a082040af..7421e7810 100644 --- a/configs/rotate/tools/inference_benchmark.py +++ b/configs/rotate/tools/inference_benchmark.py @@ -46,6 +46,9 @@ def check_version(version='2.2'): if version_installed == ['0', '0', '0', '0']: return + if version == 'develop': + raise Exception("PaddlePaddle develop version is required!") + version_split = version.split('.') length = min(len(version_installed), len(version_split)) @@ -367,7 +370,9 @@ def measure_speed(FLAGS): if __name__ == '__main__': FLAGS = parse_args() - check_version('2.4') if 'trt' in FLAGS.run_mode: + check_version('develop') check_trt_version('8.2') + else: + check_version('2.4') measure_speed(FLAGS) -- GitLab