Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • Paddle
  • Issue
  • #12578

P
Paddle
  • 项目概览

PaddlePaddle / Paddle
大约 2 年 前同步成功

通知 2325
Star 20933
Fork 5424
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 1423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
Paddle
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 1,423
    • Issue 1,423
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 543
    • 合并请求 543
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 8月 08, 2018 by saxon_zh@saxon_zhGuest

Wrong error message when run out of GPU memory

Created by: cjld

Here is a minimal example to illustrate the issue:

import os

import paddle
import paddle.fluid as fluid

sp = fluid.Program()
tp = fluid.Program()
#image_shape = [1025, 2049]
image_shape = [1025, 2049]
with fluid.program_guard(tp, sp):
    img = fluid.layers.data(name='img', shape=[50,0,0], dtype='float32')
    for i in range(1000):
        img = img + 1.0
        #img = fluid.layers.resize_bilinear(img, image_shape)

exe = fluid.Executor(fluid.CUDAPlace(0))
exe.run(sp)

import numpy as np
result = exe.run(tp, feed={'img':np.zeros((1,50,1025,2049), dtype=np.float32)}, fetch_list=[img])
print result[0].shape

outputs:

---------------------------------------------------------------------------
EnforceNotMet                             Traceback (most recent call last)
<ipython-input-4-a6475bdc6bdf> in <module>()
      1 import numpy as np
----> 2 result = exe.run(tp, feed={'img':np.zeros((1,50,1025,2049), dtype=np.float32)}, fetch_list=[img])
      3 print result[0].shape

/usr/local/lib/python2.7/dist-packages/paddle/fluid/executor.pyc in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache)
    441 
    442         self._feed_data(program, feed, feed_var_name, scope)
--> 443         self.executor.run(program.desc, scope, 0, True, True)
    444         outs = self._fetch_data(fetch_list, fetch_var_name, scope)
    445         if return_numpy:

EnforceNotMet: enforce allocating <= available failed, 11164145418 > 860487424
 at [/paddle/paddle/fluid/platform/gpu_info.cc:119]
PaddlePaddle Call Stacks: 
0       0x7f46d9cda2f6p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) + 486
1       0x7f46dab525bep paddle::platform::GpuMaxChunkSize() + 766
2       0x7f46daa8268cp void* paddle::memory::Alloc<paddle::platform::CUDAPlace>(paddle::platform::CUDAPlace, unsigned long) + 444

It seems that the paddle::platform::GpuMaxChunkSize() should not be called when running out of memory, It is only allowed to call once at the beginning.

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#12578
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7