问题描述 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
1条答案
按热度按时间oalqel3c1#
请问tensorRT的路径设置对了吗,可以参考下这个文档 https://www.paddlepaddle.org.cn/inference/v2.5/guides/install/compile/source_compile_under_Linux.html