paddle接口预测报错
Created by: prozhuchen
- 版本、环境信息: 1)PaddlePaddle版本:v1.4.1 2)CPU: 3)GPU:cuda9.0,cudnn7.0 4)系统环境:centos, python3.6
我用python接口来预测的时候,使用config.enable_use_gpu(2000, 10),即使10卡空闲,仍然会报错如下:
paddle.fluid.core.EnforceNotMet: Enforce failed. Expected allocating <= available, but received allocating:10484135660 > available:7445282560. Insufficient GPU memory to allocation. at [/paddle/paddle/fluid/platform/gpu_info.cc:262] PaddlePaddle Call Stacks: 0 0x7f4f116d3b78p void paddle::platform::EnforceNotMet::Init<std::string>(std::string, char const*, int) + 360 1 0x7f4f116d3ec7p paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) + 87 2 0x7f4f13568946p paddle::platform::GpuMaxChunkSize() + 630 3 0x7f4f1353d202p 4 0x7f4f6fb60973p pthread_once + 83 5 0x7f4f1353c8adp paddle::memory::legacy::GetGPUBuddyAllocator(int) + 109 6 0x7f4f1353d6d3p void* paddle::memory::legacy::Alloc<paddle::platform::CUDAPlace>(paddle::platform::CUDAPlace const&, unsigned long) + 35 7 0x7f4f1353db15p paddle::memory::allocation::LegacyAllocator::AllocateImpl(unsigned long, paddle::memory::allocation::Allocator::Attr) + 389 8 0x7f4f13562ebbp paddle::memory::allocation::Allocator::Allocate(unsigned long, paddle::memory::allocation::Allocator::Attr) + 27 9 0x7f4f13531713p paddle::memory::allocation::AllocatorFacade::Alloc(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&, unsigned long, paddle::memory::allocation::Allocator::Attr) + 435 10 0x7f4f13531831p paddle::memory::allocation::AllocatorFacade::AllocShared(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&, unsigned long, paddle::memory::allocation::Allocator::Attr) + 33 11 0x7f4f131380c0p paddle::memory::AllocShared(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&, unsigned long, paddle::memory::allocation::Allocator::Attr) + 48 12 0x7f4f13503e8ap paddle::framework::Tensor::mutable_data(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_>, paddle::framework::proto::VarType_Type, paddle::memory::allocation::Allocator::Attr, unsigned long) + 154 13 0x7f4f132ab195p paddle::inference::analysis::IrParamsSyncAmongDevicesPass::RunImpl(paddle::inference::analysis::Argument*) + 1685 14 0x7f4f132a57fbp paddle::inference::analysis::Analyzer::RunAnalysis(paddle::inference::analysis::Argument*) + 923 15 0x7f4f118aecb3p paddle::AnalysisPredictor::OptimizeInferenceProgram() + 83 16 0x7f4f118b010fp paddle::AnalysisPredictor::PrepareProgram(std::shared_ptr<paddle::framework::ProgramDesc> const&) + 319 17 0x7f4f118b0297p paddle::AnalysisPredictor::Init(std::shared_ptr<paddle::framework::Scope> const&, std::shared_ptr<paddle::framework::ProgramDesc> const&) + 343 18 0x7f4f118b0717p std::unique_ptr<paddle::PaddlePredictor, std::default_delete<paddle::PaddlePredictor> > paddle::CreatePaddlePredictor<paddle::AnalysisConfig, (paddle::PaddleEngineKind)2>(paddle::AnalysisConfig const&) + 1031 19 0x7f4f118b1331p std::unique_ptr<paddle::PaddlePredictor, std::default_delete<paddle::PaddlePredictor> > paddle::CreatePaddlePredictor<paddle::AnalysisConfig>(paddle::AnalysisConfig const&) + 17 20 0x7f4f117f793dp 21 0x7f4f117f79aep 22 0x7f4f1170611ep 23 0x4a8b0cp _PyCFunction_FastCallKeywords + 924 24 0x51d6ebp 25 0x512dfap _PyEval_EvalFrameDefault + 762 26 0x51c752p 27 0x51d807p 28 0x512dfap _PyEval_EvalFrameDefault + 762 29 0x51c752p 30 0x51d807p 31 0x512dfap _PyEval_EvalFrameDefault + 762 32 0x51e7f4p PyEval_EvalCode + 292 33 0x56e47ep 34 0x4203c4p PyRun_FileExFlags + 164 35 0x42076ap PyRun_SimpleFileExFlags + 880 36 0x573c65p Py_Main + 1941 37 0x454208p main + 232 38 0x7f4f6f0bdbd5p __libc_start_main + 245 39 0x56bbf5p
求问解决方法