paddle在jetson nano上使用c++进行gpu推理时报错
Created by: wumeng2
PaddlePaddle版本:develop分支 commitID: 0dc485e6 是你们仓库8月7号最后一次上传的代码
硬件信息: jetson nano 使用jetpack 4.4 dp包刷机,里面时cuda10.2 cudnn8.0
使用如下cmake命令可以成功编译,
cmake 命令:cmake ..
-DWITH_CONTRIB=OFF
-DWITH_MKL=OFF
-DWITH_MKLDNN=OFF
-DWITH_TESTING=OFF
-DCMAKE_BUILD_TYPE=Release
-DON_INFER=ON
-DWITH_PYTHON=OFF
-DWITH_XBYAK=OFF
-DWITH_GPU=ON
-DWITH_NV_JETSON=ON
但是在使用paddleocr时在gpu预测出现如下错误 terminate called after throwing an instance of 'paddle::platform::EnforceNotMet' what():
Compile Traceback (most recent call last): File "/opt/_internal/cpython-3.7.0/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2525, in append_op attrs=kwargs.get("attrs", None))
File "/opt/_internal/cpython-3.7.0/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/opt/_internal/cpython-3.7.0/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 1405, in conv2d
"data_format": data_format,
File "/paddle/PaddlePaddle/PaddleOCR/ppocr/modeling/backbones/rec_resnet_vd.py", line 156, in conv_bn_layer
bias_attr=False)
File "/paddle/PaddlePaddle/PaddleOCR/ppocr/modeling/backbones/rec_resnet_vd.py", line 258, in basic_block
name=name + "_branch2a")
File "/paddle/PaddlePaddle/PaddleOCR/ppocr/modeling/backbones/rec_resnet_vd.py", line 128, in __call__
name=conv_name)
File "/paddle/PaddlePaddle/PaddleOCR/ppocr/modeling/architectures/rec_model.py", line 99, in __call__
conv_feas = self.backbone(inputs)
File "/paddle/PaddlePaddle/PaddleOCR/tools/program.py", line 193, in build_export
image, outputs = model(mode='export')
File "tools/export_model.py", line 67, in main
config, eval_program, startup_prog)
File "tools/export_model.py", line 93, in <module>
main()
C++ Traceback (most recent call last):
0 paddle::AnalysisPredictor::ZeroCopyRun() 1 paddle::framework::NaiveExecutor::Run() 2 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&) 3 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const 4 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const 5 std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CUDAPlace, false, 0ul, paddle::operators::CUDNNConvFusionOpKernel, paddle::operators::CUDNNConvFusionOpKernel >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1 (closed)}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&) 6 paddle::operators::CUDNNConvFusionOpKernel::Compute(paddle::framework::ExecutionContext const&) const 7 paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) 8 std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int) 9 paddle::platform::GetCurrentTraceBackStringabi:cxx11
Error Message Summary:
ExternalError: Cudnn error, CUDNN_STATUS_EXECUTION_FAILED at (/home/py/Downloads/Paddle-develop/paddle/fluid/operators/fused/conv_fusion_op.cu:305) [operator < conv2d_fusion > error] Aborted (core dumped) 谢谢!