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, test=develop (#31833) #31846

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

winter-wang
Copy link
Contributor

PR types

Bug fixes

PR changes

OPs

Describe

cherry-pick到release2.0分支。修复了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.

Copy link
Contributor

@Superjomn Superjomn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Superjomn Superjomn merged commit c7a6a1f into PaddlePaddle:release/2.0 Mar 25, 2021
@winter-wang winter-wang deleted the fix_rnn_bug branch March 25, 2021 12:16
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.

3 participants