Skip to content

【Fix PIR Unittest No.551,553,554】Fix some test case in PIR - #65307

Merged
wanghuancoder merged 38 commits into
PaddlePaddle:developfrom
wanghuancoder:fix_pir_rnn3
Jun 25, 2024
Merged

wanghuancoder merged 38 commits into
PaddlePaddle:developfrom
wanghuancoder:fix_pir_rnn3

Conversation

@wanghuancoder

@wanghuancoder wanghuancoder commented Jun 20, 2024 •

Copy link
Copy Markdown
Contributor

PR Category

Others

PR Types

Others

Description

修复rnn下单测,修复问题包括:

  1. ArrayReadInferMeta,需要在组网期间返回一个shape,不能是-1,否则rnn后面的slice会崩溃。老静态图返回的是数组中第一个Tensor的shape,PIR与其对齐,好像也不是很好的做法,但暂时这么解决。
  2. ArrayToTensorInferMeta,忘记set_dtype导致dtype默认都是fp32的,因此选的kernel都是fp32的。如果input是非fp32的运行时就会报错。
  3. 修改反向组网逻辑,如果output都是stop_gradient=True的,不需要插入反向节点,往往发生在forward only的算子上。
  4. PIR rnn不应该走_rnn_dynamic_graph,而应该走_rnn_static_graph。
  5. PIR不支持Program clone后再继续组网,因为op中都是只想原来的Program中的Value
  6. 修复其它一些问题,使PIR支持rnn。

遗留问题:

  1. test_rnn_api while op会崩溃,待解决
  2. test_rnn_nets_static,如何处理_dropout_state的特殊场景待解决

关联Issue:#63740

Pcard-67164

@paddle-bot

paddle-bot Bot commented Jun 20, 2024

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@Aurelius84 Aurelius84 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@wanghuancoder
wanghuancoder merged commit 76c0382 into PaddlePaddle:develop Jun 25, 2024
co63oc pushed a commit to co63oc/Paddle that referenced this pull request Jun 25, 2024
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.

4 participants