使用AMD出现错误 paddle.fluid.core_avx.EnforceNotMet: Invoke operator matmul error.
Created by: iceriver97
1)PaddlePaddle版本:paddlepaddle-gpu==1.5.1.post97 2)CPU:AMD Ryzen 7 3700X 8-Core Processor × 16 3)GPU:Nvidia 2070 super ; CUDA=9.0 cuDnn = 7.6.5 4)系统环境:Ubuntu 16.04 python = 3.7
报错信息:
I0904 09:06:13.223136 6845 parallel_executor.cc:329] The number of CUDAPlace, which is used in ParallelExecutor, is 1. And the Program will be copied 1 copies
I0904 09:06:13.228498 6845 build_strategy.cc:340] SeqOnlyAllReduceOps:0, num_trainers:1
[INFO] 2020-09-04 09:06:13,251 [ run_duie.py: 386]: testing ./data/test.json, save to ./data/predict_dev.json
Traceback (most recent call last):
File "./ernie/run_duie.py", line 406, in <module>
main(args)
File "./ernie/run_duie.py", line 316, in main
prediction = predict_wrapper(reader, exe, test_prog, test_pyreader, graph_vars,'final', 'final')
File "./ernie/run_duie.py", line 387, in predict_wrapper
res = predict(args, examples, exe, test_prog, test_pyreader, graph_vars)
File "/home/speedchina/Paddlepaddle/PaddleServing/DuIe_baseline/ernie/finetune/relation_extraction_multi_cls.py", line 444, in predict
exe.run(program=test_program, fetch_list=fetch_list, return_numpy=False)
File "/home/speedchina/anaconda3/envs/pp-1.5/lib/python3.7/site-packages/paddle/fluid/executor.py", line 651, in run
use_program_cache=use_program_cache)
File "/home/speedchina/anaconda3/envs/pp-1.5/lib/python3.7/site-packages/paddle/fluid/executor.py", line 749, in _run
exe.run(program.desc, scope, 0, True, True, fetch_var_name)
paddle.fluid.core_avx.EnforceNotMet: Invoke operator matmul error.
Python Callstacks:
File "/home/speedchina/anaconda3/envs/pp-1.5/lib/python3.7/site-packages/paddle/fluid/framework.py", line 1771, in append_op
attrs=kwargs.get("attrs", None))
File "/home/speedchina/anaconda3/envs/pp-1.5/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 "/home/speedchina/anaconda3/envs/pp-1.5/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 5255, in matmul
'alpha': float(alpha),
File "/home/speedchina/Paddlepaddle/PaddleServing/DuIe_baseline/ernie/model/ernie.py", line 144, in _build_model
x=input_mask, y=input_mask, transpose_y=True)
File "/home/speedchina/Paddlepaddle/PaddleServing/DuIe_baseline/ernie/model/ernie.py", line 97, in __init__
input_mask)
File "/home/speedchina/Paddlepaddle/PaddleServing/DuIe_baseline/ernie/finetune/relation_extraction_multi_cls.py", line 163, in create_model
config=ernie_config)
File "./ernie/run_duie.py", line 159, in main
ernie_config=ernie_config)
File "./ernie/run_duie.py", line 406, in <module>
main(args)
C++ Callstacks:
CUBLAS: execution failed, at [/paddle/paddle/fluid/operators/math/blas_impl.cu.h:50]
PaddlePaddle Call Stacks:
0 0x7f224f6da830p void paddle::platform::EnforceNotMet::Init<char const*>(char const*, char const*, int) + 352
1 0x7f224f6daba9p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) + 137
2 0x7f224fabaa57p void paddle::operators::math::Blas<paddle::platform::CUDADeviceContext>::MatMul<float>(paddle::framework::Tensor const&, paddle::operators::math::MatDescriptor const&, paddle::framework::Tensor const&, paddle::operators::math::MatDescriptor const&, float, paddle::framework::Tensor*, float) const + 1431
3 0x7f224fabafb9p paddle::operators::MatMulKernel<paddle::platform::CUDADeviceContext, float>::Compute(paddle::framework::ExecutionContext const&) const + 761
4 0x7f224fabb0c3p std::_Function_handler<void (paddle::framework::ExecutionContext const&), paddle::framework::OpKernelRegistrarFunctor<paddle::platform::CUDAPlace, false, 0ul, paddle::operators::MatMulKernel<paddle::platform::CUDADeviceContext, float>, paddle::operators::MatMulKernel<paddle::platform::CUDADeviceContext, double>, paddle::operators::MatMulKernel<paddle::platform::CUDADeviceContext, paddle::platform::float16> >::operator()(char const*, char const*, int) const::{lambda(paddle::framework::ExecutionContext const&)#1}>::_M_invoke(std::_Any_data const&, paddle::framework::ExecutionContext const&) + 35
5 0x7f2251640f07p paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&, paddle::framework::RuntimeContext*) const + 375
6 0x7f22516412e1p paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) const + 529
7 0x7f225163e8dcp paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) + 332
8 0x7f224f8656fep paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) + 606
9 0x7f224f8686bfp paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocator<std::string> > const&, bool) + 143
10 0x7f224f6cbebdp
11 0x7f224f70d166p
12 0x55d5fa830c94p _PyMethodDef_RawFastCallKeywords + 612
13 0x55d5fa830db1p _PyCFunction_FastCallKeywords + 33
14 0x55d5fa89c9a1p _PyEval_EvalFrameDefault + 20945
15 0x55d5fa7e02b9p _PyEval_EvalCodeWithName + 761
16 0x55d5fa830497p _PyFunction_FastCallKeywords + 903
17 0x55d5fa898cbap _PyEval_EvalFrameDefault + 5354
18 0x55d5fa7e02b9p _PyEval_EvalCodeWithName + 761
19 0x55d5fa830497p _PyFunction_FastCallKeywords + 903
20 0x55d5fa898cbap _PyEval_EvalFrameDefault + 5354
21 0x55d5fa83020bp _PyFunction_FastCallKeywords + 251
22 0x55d5fa897be6p _PyEval_EvalFrameDefault + 1046
23 0x55d5fa83020bp _PyFunction_FastCallKeywords + 251
24 0x55d5fa897be6p _PyEval_EvalFrameDefault + 1046
25 0x55d5fa83020bp _PyFunction_FastCallKeywords + 251
26 0x55d5fa897be6p _PyEval_EvalFrameDefault + 1046
27 0x55d5fa7e02b9p _PyEval_EvalCodeWithName + 761
28 0x55d5fa7e11d4p PyEval_EvalCodeEx + 68
29 0x55d5fa7e11fcp PyEval_EvalCode + 28
30 0x55d5fa8f6f44p
31 0x55d5fa9012b1p PyRun_FileExFlags + 161
32 0x55d5fa9014a3p PyRun_SimpleFileExFlags + 451
33 0x55d5fa9025d5p
34 0x55d5fa9026fcp _Py_UnixMain + 60
35 0x7f229eb9e830p __libc_start_main + 240
36 0x55d5fa8a73c0p
在使用 Intel 的机器上程序可以正常运行; 除了更换CPU还有别的解决办法嘛?