再aistudio上paddlepaddle训练报错

vm0i2vca  于 2022-11-05  发布在  其他
关注(0)|答案(3)|浏览(468)

paddle版本:2.2.1
环境:aistudio BML 至尊版

训练的时候说GPU初始化失败

File "/home/aistudio/work/debertav2/DeBERTa_Decoding-enhanced_BERT_with_Disentangled_Attention/scripts/bert.py", line 253, ininit
self.word_embeddings = nn.Embedding(config.vocab_size, self.embedding_size, padding_idx=padding_idx)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/nn/layer/common.py", line 1390, ininit
is_bias=False)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py", line 424, in create_parameter
default_initializer)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layer_helper_base.py", line 378, in create_parameter

**attr._to_kwargs(with_initializer=True))

File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 3137, in create_parameter
initializer(param, self)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/initializer.py", line 572, incall
stop_gradient=True)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 3167, in append_op
kwargs.get("stop_gradient", False))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/tracer.py", line 45, in trace_op
not stop_gradient)
OSError: (External) CUDA error(3), initialization error.
[Hint: 'cudaErrorInitializationError'. The API call failed because the CUDA driver and runtime could not be initialized. ] (at /paddle/paddle/fluid/platform/gpu_info.cc:108)
[operator < uniform_random > error]

7gcisfzg

7gcisfzg1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档常见问题历史IssueAI社区 来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

3b6akqbq

3b6akqbq2#

check一下 paddle按照是否正确 paddle.utils.run_check()

58wvjzkj

58wvjzkj3#

正确batch_size设置16就会报这个错,batch_size减小后就能正常跑了,可能是显存不足的问题,为什么显存不足不报显存不足,而是说cuda初始化错误

相关问题