PaddlePaddle / Paddle

PArallel Distributed Deep LEarning: Machine Learning Framework from Industrial Practice (『飞桨』核心框架,深度学习&机器学习高性能单机、分布式训练和跨平台部署)
http://www.paddlepaddle.org/
Apache License 2.0
22.3k stars 5.62k forks source link

编译的时候添加了tensorrt的选项,但是编译完成后没有tensorrt的信息 #56127

Closed kamiLight closed 3 months ago

kamiLight commented 1 year ago

问题描述 Issue Description

cmake命令:

cmake .. -DPY_VERSION=3 -DWITH_TESTING=OFF -DCUDA_ARCH_NAME=All -DWITH_MKL=ON -DWITH_GPU=ON -DON_INFER=ON -DCMAKE_BUILD=Release -DWITH_ONNXRUNTIM=ON -DWITH_TENSORRT=ON -DTENSORRT_ROOT=/usr/lib/x86_64-linux-gnu/ ..

编译没有报错,但是paddle_inference_install_dir的version中没有tensorrt的信息

GIT COMMIT ID: f0422a28d75f9345fa3b801c01cd0284b3b44be3
WITH_MKL: ON
WITH_MKLDNN: ON
WITH_GPU: ON
WITH_ROCM: OFF
WITH_ASCEND_CL: OFF
WITH_ASCEND_CXX11: OFF
WITH_IPU: OFF
CUDA version: 11.1
CUDNN version: v8.0
CXX compiler version: 7.5.0

同时c++部署时如果使用tensorrt则会报错:

WARNING: Logging before InitGoogleLogging() is written to STDERR
I0809 20:45:12.757385 23642 analysis_predictor.cc:1099] TensorRT subgraph engine is enabled
--- Running analysis [ir_graph_build_pass]
--- Running analysis [ir_analysis_pass]
terminate called after throwing an instance of 'phi::enforce::EnforceNotMet'
  what():  (InvalidArgument) Pass tensorrt_subgraph_pass has not been registered. Please use the paddle inference library compiled with tensorrt or disable the tensorrt engine in inference configuration! 
  [Hint: Expected Has(pass_type) == true, but received Has(pass_type):0 != true:1.] (at /home/yanjiaxing/Paddle/paddle/fluid/framework/ir/pass.h:261)

Aborted (core dumped)

版本&环境信息 Version & Environment Information

paddle version: 2.4 cuda: 11.1 cudnn: 8.1 tensorrt: 7.2.1

zoooo0820 commented 1 year ago

请问tensorRT的路径设置对了吗,可以参考下这个文档https://www.paddlepaddle.org.cn/inference/v2.5/guides/install/compile/source_compile_under_Linux.html

paddle-bot[bot] commented 3 months ago

Since you haven\'t replied for more than a year, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. 由于您超过一年未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开,我们会继续跟进。