GPU使用报错
Created by: nihuizhidao
欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献! 在留下您的问题时,辛苦您同步提供如下信息:
- 版本、环境信息
paddlehub 1.7.1
paddlepaddle-gpu 1.8.1.post107
CentOS7, cuda 10.0, pyramidbox_lite_server=1.2.0
- 复现信息:如为报错,请给出复现环境、复现步骤
Process Process-3: Traceback (most recent call last): File "/home/scc/anaconda3/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/scc/anaconda3/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "/home/scc/Projects/AIDetectionProjects/facenet/get_infer_result_facenet.py", line 127, in infer_process face_detector = hub.Module(name="pyramidbox_lite_server") File "/home/scc/anaconda3/lib/python3.7/site-packages/paddlehub/module/module.py", line 102, in new name=name, version=version, **kwargs) File "/home/scc/anaconda3/lib/python3.7/site-packages/paddlehub/module/module.py", line 178, in init_with_name return cls.init_with_directory(directory=module_dir[0], **kwargs) File "/home/scc/anaconda3/lib/python3.7/site-packages/paddlehub/module/module.py", line 200, in init_with_directory user_module = _item(directory=directory, **kwargs) File "/home/scc/anaconda3/lib/python3.7/site-packages/paddlehub/module/module.py", line 146, in init self._initialize(**kwargs) File "/home/scc/.paddlehub/modules/pyramidbox_lite_server/module.py", line 30, in _initialize self._set_config() File "/home/scc/.paddlehub/modules/pyramidbox_lite_server/module.py", line 53, in _set_config self.gpu_predictor = create_paddle_predictor(gpu_config) 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 paddle::platform::SetDeviceId(int) 3 paddle::AnalysisConfig::fraction_of_gpu_memory_for_pool() const 4 std::unique_ptr<paddle::PaddlePredictor, std::default_deletepaddle::PaddlePredictor > paddle::CreatePaddlePredictor<paddle::AnalysisConfig, (paddle::PaddleEngineKind)2>(paddle::AnalysisConfig const&) 5 std::unique_ptr<paddle::PaddlePredictor, std::default_deletepaddle::PaddlePredictor > paddle::CreatePaddlePredictorpaddle::AnalysisConfig(paddle::AnalysisConfig const&)
Error Message Summary:
ExternalError: Cuda error(3), initialization error. [Advise: The API call failed because the CUDA driver and runtime could not be initialized. ] at (/paddle/paddle/fluid/platform/gpu_info.cc:212)
Process Process-2: Traceback (most recent call last): File "/home/scc/anaconda3/lib/python3.7/multiprocessing/managers.py", line 811, in _callmethod conn = self._tls.connection AttributeError: 'ForkAwareLocal' object has no attribute 'connection'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/scc/anaconda3/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap self.run() File "/home/scc/anaconda3/lib/python3.7/multiprocessing/process.py", line 99, in run self._target(*self._args, **self._kwargs) File "/home/scc/Projects/AIDetectionProjects/facenet/get_infer_result_facenet.py", line 115, in buffering_process stack.append(img[y_start: y_end, x_start: x_end]) File "", line 2, in append File "/home/scc/anaconda3/lib/python3.7/multiprocessing/managers.py", line 815, in _callmethod self._connect() File "/home/scc/anaconda3/lib/python3.7/multiprocessing/managers.py", line 802, in _connect conn = self._Client(self._token.address, authkey=self._authkey) File "/home/scc/anaconda3/lib/python3.7/multiprocessing/connection.py", line 492, in Client c = SocketClient(address) File "/home/scc/anaconda3/lib/python3.7/multiprocessing/connection.py", line 619, in SocketClient s.connect(address) FileNotFoundError: [Errno 2] No such file or directory
我使用的是多线程,paddlehub的调用和创建都在同一个线程里,另外,同一个线程里我还调用了一个TF的模型,也是使用GPU,但是我看了
.paddlehub/modules/pyramidbox_lite_server/module.py
种指定GPU只用1000M,所以我的GPU内存应该还是够的,不知道这个错误是什么原因导致的?
有点着急,谢谢!