Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix runtime crash when rnn model inference. #31833

Merged
merged 1 commit into from
Mar 24, 2021

Conversation

winter-wang
Copy link
Contributor

@winter-wang winter-wang commented Mar 24, 2021

PR types

Bug fixes

PR changes

Ops

Describe

修复了rnn动态图转静态图后运行时崩溃问题。
1、recurrent op的输入tensor在memory_optimizer_pass中被重命名的话,会导致相应的子block中的op找不着输入tensor.报错。因此将recurrent op加入到了memory_optimizer_pass的skip列表。
2、recurrent op执行时的内存回收会导致局部输出被拷贝到全局之前被释放。因此在recurrent op的执行子块中关闭垃圾回收机制。
3、recurrent op的局部输出拷贝到全局的逻辑有误,进行了修复。
4、 batch_norm kernel在训练时少传递了一个is_test参数,导致底层的is_test采用了默认值,出现了训练前向时和静态图推理时不精度不一致的情况。进行了补充。

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@Shixiaowei02 Shixiaowei02 merged commit e7f28d6 into PaddlePaddle:develop Mar 24, 2021
@winter-wang winter-wang deleted the fix_rnn_bug branch March 24, 2021 10:28
winter-wang added a commit to winter-wang/Paddle that referenced this pull request Mar 24, 2021
@winter-wang winter-wang changed the title fix runtime crash when rnn model inference, test=develop fix runtime crash when rnn model inference. Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants