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

ExternalError: Cublas error, CUBLAS_STATUS_NOT_INITIALIZED #1019

Closed
shaoyangxu opened this issue Oct 27, 2020 · 7 comments
Closed

ExternalError: Cublas error, CUBLAS_STATUS_NOT_INITIALIZED #1019

shaoyangxu opened this issue Oct 27, 2020 · 7 comments

Comments

@shaoyangxu
Copy link

Traceback (most recent call last):
File "infer_tools/predict_system.py", line 287, in
main(utility.parse_args())
File "infer_tools/predict_system.py", line 231, in main
dt_boxes, rec_res = text_sys(img)
File "infer_tools/predict_system.py", line 88, in call
dt_boxes, elapse = self.text_detector(img)
File "/home/ywzhang/xsy/OCR_NER1/infer_tools/predict_det.py", line 89, in call
self.predictor.run([im])
paddle.fluid.core_avx.EnforceNotMet:


C++ Traceback (most recent call last):

0 paddle::AnalysisPredictor::Run(std::vector<paddle::PaddleTensor, std::allocatorpaddle::PaddleTensor > const&, std::vector<paddle::PaddleTensor, std::allocatorpaddle::PaddleTensor >, int)
1 paddle::AnalysisPredictor::SetFeed(std::vector<paddle::PaddleTensor, std::allocatorpaddle::PaddleTensor > const&, paddle::framework::Scope
)
2 paddle::PaddleTensorToLoDTensor(paddle::PaddleTensor const&, paddle::framework::LoDTensor*, paddle::platform::Place const&)
3 paddle::platform::DeviceContextPool::Get(paddle::platform::Place const&)
4 std::__future_base::_Deferred_state<std::_Bind_simple<paddle::platform::EmplaceDeviceContext<paddle::platform::CUDADeviceContext, paddle::platform::CUDAPlace>(std::map<paddle::platform::Place, std::shared_future<std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > >, std::lesspaddle::platform::Place, std::allocator<std::pair<paddle::platform::Place const, std::shared_future<std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > > > > >, paddle::platform::Place)::{lambda()#1} ()>, std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > >::_M_run_deferred()
5 std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&)
6 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > >, std::__future_base::_Result_base::_Deleter>, std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > > >::_M_invoke(std::_Any_data const&)
7 std::_Function_handler<std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > (), std::reference_wrapper<std::_Bind_simple<paddle::platform::EmplaceDeviceContext<paddle::platform::CUDADeviceContext, paddle::platform::CUDAPlace>(std::map<paddle::platform::Place, std::shared_future<std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > >, std::lesspaddle::platform::Place, std::allocator<std::pair<paddle::platform::Place const, std::shared_future<std::unique_ptr<paddle::platform::DeviceContext, std::default_deletepaddle::platform::DeviceContext > > > > >
, paddle::platform::Place)::{lambda()#1} ()> > >::_M_invoke(std::_Any_data const&)
8 paddle::platform::CUDADeviceContext::CUDADeviceContext(paddle::platform::CUDAPlace)
9 paddle::platform::CUDAContext::CUDAContext(paddle::platform::CUDAPlace const&, paddle::platform::stream::Priority const&)
10 paddle::platform::CublasHandleHolder::CublasHandleHolder(CUstream_st*, cublasMath_t)
11 paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int)
12 std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int)
13 paddle::platform::GetCurrentTraceBackString()


Error Message Summary:

ExternalError: Cublas error, CUBLAS_STATUS_NOT_INITIALIZED (at /paddle/paddle/fluid/platform/cuda_helper.h:81)

@shaoyangxu
Copy link
Author

cuda 10.0.130

@littletomatodonkey
Copy link
Collaborator

你好,错误提示显示,是cuBLAS 库没有安装成功,请检查GPU CUDA环境是否安装正常,可以试着把cuda路径以及cudnn路径添加到LD_LIBRARY_PATH

@shaoyangxu
Copy link
Author

你好,错误提示显示,是cuBLAS 库没有安装成功,请检查GPU CUDA环境是否安装正常,可以试着把cuda路径以及cudnn路径添加到LD_LIBRARY_PATH

感谢回复,后来我换了一个节点,后来就好了。

@Peng-ss
Copy link

Peng-ss commented Mar 26, 2021

你好,遇到同样的问题,请求如何解决的?

@77h2l
Copy link

77h2l commented Jun 21, 2021

@littletomatodonkey 请问paddlepaddle 包的版本和cuda版本是否有对应关系,遇到了同样的错误,cuda相关动态库配置没有问题,paddlepaddle-gpu 2.1.0 和cuda11.1是对应关系吗

@ljcljc
Copy link

ljcljc commented Nov 9, 2021

同问,还没有解决这个问题

@sususu1
Copy link

sususu1 commented Nov 19, 2021

我是通过把paddle版本和cuda版本与代码所需版本都匹配后,解决了这个问题
其中Cublas是cuda里面的一个关联库文件

an1018 pushed a commit to an1018/PaddleOCR that referenced this issue Aug 17, 2022
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

7 participants