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

[PIR] refine the build interface for while_op #59423

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

winter-wang
Copy link
Contributor

@winter-wang winter-wang commented Nov 28, 2023

PR types

New features

PR changes

Others

Description

  • 调整WhileOp的Build接口,调整前,Build接口只会构建body block, 不会给body block构建BlockArguemnt。 调整后,会在Build函数中同步构建BlockArgument,使用者直接访问body block的arg()接口获取参数即可,无需显式调用AddArgument添加参数。
  • 调整OperationArgument的AddRegion()接口的返回值,由返回Region*调整为返回Region&, 因为改函数的返回值不可能为空指针。
  • 重命名Block的argument、argument_type接口为arg、arg_type。调整原因:在没有语意混淆的情况下,名字以短为好。
  • 重命名BlockArgument的arg_index、set_arg_index接口为index、set_index。调整原因:BlockArgument的类型名已经标明是Argument了,因此成员函数直接用index即可。

Other

Pcard-67164

Copy link

paddle-bot bot commented Nov 28, 2023

你的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.

Copy link

paddle-bot bot commented Nov 28, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@winter-wang winter-wang merged commit d2911ce into PaddlePaddle:develop Nov 28, 2023
29 checks passed
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