Skip to content

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

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

ngraph cannot be used with garbage collection strategy together

Created by: sneaxiy

We found that when FLAGS_use_ngraph is true and FLAGS_eager_delete_tensor_gb is 0, there is difference in almost all ngraph unittests test_xxx_ngraph_op.py.

FLAGS_eager_delete_tensor_gb is an environment variable to control whether garbage collection strategy is enabled. If FLAGS_eager_delete_tensor_gb is larger than or equal to 0, garbage collection strategy is enabled.

The garbage collection strategy in PaddlePaddle is designed to save both GPU and CPU memory usages. It would release memory of Tensors which would not be used in the following network calculation.

For example, there is a network with only 3 operators:

x2 = op1(x1)
x3 = op2(x2)
x4 = op3(x3)

Before op2 runs, we can release memory of x1 because x1 would not be be used any more after op1 runs. For the same reason, we can release memory of x2 after op2 runs, and release memory of x3 after op3 runs. Finally, the network would become something like:

x2 = op1(x1)
release_memory(x1)
x3 = op2(x2)
release_memory(x2)
x4 = op3(x3)
release_memory(x3)

Does ngraph implementation in PaddlePaddle would be conflict with garbage collection strategy above?

How to reproduce

If you want to reproduce the problem, please comment this line and run any test_xxx_ngraph_op.py.

https://github.com/PaddlePaddle/Paddle/blob/e9233d1c1ee1a0e3cc97bcb9cd2c4a71342c06fb/paddle/fluid/framework/executor.cc#L70

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