Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU一直没用上 #101

Closed
genghuan2005 opened this issue May 27, 2020 · 8 comments
Closed

GPU一直没用上 #101

genghuan2005 opened this issue May 27, 2020 · 8 comments

Comments

@genghuan2005
Copy link

genghuan2005 commented May 27, 2020

我安装了 paddlepaddle-gpu==1.7.2.post97,但是运行时报错:
Traceback (most recent call last):
File "tools/infer/predict_system.py", line 116, in
dt_boxes, rec_res = text_sys(img)
File "tools/infer/predict_system.py", line 67, in call
dt_boxes, elapse = self.text_detector(img)
File "/home/import/gh/project/PaddleOCR-develop/tools/infer/predict_det.py", line 109, in call
self.predictor.zero_copy_run()
paddle.fluid.core_avx.EnforceNotMet:


C++ Call Stacks (More useful to developers):

0 std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int)
1 paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int)
2 cudnnActivationStruct* paddle::platform::ScopedActivationDescriptor::descriptor(std::string const&, double)
3 paddle::operators::CUDNNConvFusionOpKernel::Compute(paddle::framework::ExecutionContext const&) const
4 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}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&)
5 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const
6 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const
7 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&)
8 paddle::framework::NaiveExecutor::Run()
9 paddle::AnalysisPredictor::ZeroCopyRun()


Python Call Stacks (More useful to users):

File "/root/miniconda3/envs/ocrpy36/lib/python3.6/site-packages/paddle/fluid/framework.py", line 2525, in append_op
attrs=kwargs.get("attrs", None))
File "/root/miniconda3/envs/ocrpy36/lib/python3.6/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/root/miniconda3/envs/ocrpy36/lib/python3.6/site-packages/paddle/fluid/layers/nn.py", line 1405, in conv2d
"data_format": data_format,
File "/paddle/PaddleOCR/github/PaddleOCR/ppocr/modeling/backbones/det_mobilenet_v3.py", line 153, in conv_bn_layer
bias_attr=False)
File "/paddle/PaddleOCR/github/PaddleOCR/ppocr/modeling/backbones/det_mobilenet_v3.py", line 98, in call
name='conv1')
File "/paddle/PaddleOCR/github/PaddleOCR/ppocr/modeling/architectures/det_model.py", line 111, in call
conv_feas = self.backbone(image)
File "/paddle/PaddleOCR/github/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
main()


Error Message Summary:

Error: An error occurred here. There is no accurate error hint for this error yet. We are continuously in the process of increasing hint for this kind of error check. It would be helpful if you could inform us of how this conversion went by opening a github issue. And we will resolve it with high priority.

@genghuan2005
Copy link
Author

我安装了 paddlepaddle-gpu==1.7.2.post97,但是运行时报错:
Traceback (most recent call last):
File "tools/infer/predict_system.py", line 116, in
dt_boxes, rec_res = text_sys(img)
File "tools/infer/predict_system.py", line 67, in call
dt_boxes, elapse = self.text_detector(img)
File "/home/import/gh/project/PaddleOCR-develop/tools/infer/predict_det.py", line 109, in call
self.predictor.zero_copy_run()
paddle.fluid.core_avx.EnforceNotMet:

C++ Call Stacks (More useful to developers):
0 std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int)
1 paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int)
2 cudnnActivationStruct* paddle::platform::ScopedActivationDescriptor::descriptor(std::string const&, double)
3 paddle::operators::CUDNNConvFusionOpKernel::Compute(paddle::framework::ExecutionContext const&) const
4 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}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&)
5 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&, paddle::framework::RuntimeContext*) const
6 paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const
7 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&)
8 paddle::framework::NaiveExecutor::Run()
9 paddle::AnalysisPredictor::ZeroCopyRun()

Python Call Stacks (More useful to users):
File "/root/miniconda3/envs/ocrpy36/lib/python3.6/site-packages/paddle/fluid/framework.py", line 2525, in append_op
attrs=kwargs.get("attrs", None))
File "/root/miniconda3/envs/ocrpy36/lib/python3.6/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/root/miniconda3/envs/ocrpy36/lib/python3.6/site-packages/paddle/fluid/layers/nn.py", line 1405, in conv2d
"data_format": data_format,
File "/paddle/PaddleOCR/github/PaddleOCR/ppocr/modeling/backbones/det_mobilenet_v3.py", line 153, in conv_bn_layer
bias_attr=False)
File "/paddle/PaddleOCR/github/PaddleOCR/ppocr/modeling/backbones/det_mobilenet_v3.py", line 98, in call
name='conv1')
File "/paddle/PaddleOCR/github/PaddleOCR/ppocr/modeling/architectures/det_model.py", line 111, in call
conv_feas = self.backbone(image)
File "/paddle/PaddleOCR/github/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
main()

Error Message Summary:
Error: An error occurred here. There is no accurate error hint for this error yet. We are continuously in the process of increasing hint for this kind of error check. It would be helpful if you could inform us of how this conversion went by opening a github issue. And we will resolve it with high priority.

New issue link: https://github.com/PaddlePaddle/Paddle/issues/new
Recommended issue content: all error stack information
[Hint: CUDNN_STATUS_BAD_PARAM] at (/paddle/paddle/fluid/platform/cudnn_helper.h:463)
[operator < conv2d_fusion > error]

请问有人遇到过这个问题吗?

@LDOUBLEV
Copy link
Collaborator

LDOUBLEV commented May 27, 2020

设置 use_gpu=False 再试试可以不

python3 tools/infer/predict_system.py --image_dir="./doc/imgs/11.jpg" --det_model_dir="./inference/det/"  --rec_model_dir="./inference/rec/" --use_gpu=False

像是cudnn的问题

@genghuan2005
Copy link
Author

use_gpu=False

设置use_gpu=False时,可以运行成功,但是速度慢,怎么让它在GPU上跑呢。我的cuda是9.0的,有没有问题?

@tink2123
Copy link
Collaborator

您的cuDNN版本是多少呢?paddle要求使用 cuDNN 7.3+

@genghuan2005
Copy link
Author

您的cuDNN版本是多少呢?paddle要求使用 cuDNN 7.3+
我的是7.0.5的,我升级一下试试

@genghuan2005
Copy link
Author

您的cuDNN版本是多少呢?paddle要求使用 cuDNN 7.3+

升级cudnn之后,问题解决了,多谢 @tink2123 @LDOUBLEV

@tink2123
Copy link
Collaborator

好的~ 不客气

@lin1github
Copy link

好的~ 不客气

你好,请问你升级到了cudnn多少呀,我升级了也发现依然报错

an1018 pushed a commit to an1018/PaddleOCR that referenced this issue Aug 17, 2022
* fix mixup error when dataset has only 1 sample

* refine log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants