Skip to content

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

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 9月 26, 2019 by saxon_zh@saxon_zhGuest

argsort GPU预测报错(temporary_buffer::allocate: get_temporary_buffer failed)

Created by: lxastro

环境: CentOS 6.3 Python 3.6.5 PaddlePaddle 1.5.0 GPU版 GPU:Tesla P40 CUDA: cuda-9.0 配置:

FLAGS_eager_delete_tensor_gb=0.0
FLAGS_fast_eager_deletion_mode=1
FLAGS_fraction_of_gpu_memory_to_use=0.9
FLAGS_limit_of_tmp_allocation=0
CUDA_VISIBLE_DEVICES=0

问题描述: 模型预测时,使用CPU预测,完全正常。 使用GPU预测,将 place = fluid.CPUPlace()改为 place = fluid.CUDAPlace(0) 后出现错误:

temporary_buffer::allocate: get_temporary_buffer failed
temporary_buffer::allocate: get_temporary_buffer failed
temporary_buffer::allocate: get_temporary_buffer failed
temporary_buffer::allocate: get_temporary_buffer failed
temporary_buffer::allocate: get_temporary_buffer failed
terminate called after throwing an instance of 'thrust::system::system_error'
  what():  device free failed: unspecified launch failure
Aborted

最小复现代码如下:

import paddle.fluid as fluid
import numpy as np
import sys
N = 900
if len(sys.argv)>1:
    N = int(sys.argv[1])
def sort(feat):
    feat, _ = fluid.layers.argsort(input=feat, axis=2)
    return feat
def get_data():
    return np.zeros((2, 1024, N), dtype='float32')
if __name__ == "__main__":
    x = fluid.layers.data(name='x', dtype='float32', shape=[1024, N])
    y = sort(x)
    place = fluid.CUDAPlace(0)
    exe = fluid.Executor(place)
    program = fluid.default_main_program()
    exe.run(fluid.default_startup_program())
    test_program = program.clone(for_test=True)
    indata = get_data()
    result = exe.run(test_program, feed={"x": indata}, fetch_list=[y])
    print('output:', result[0].shape)

在上述代码中: 将N设置为200以下,基本不会报错。 将N设置为250左右,有一定概率报错。 将N设置为300以上,几乎都会报错。

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#20021
渝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