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 Dist Op Reg No.12】 reg all_reduce #62634

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

xiaoyewww
Copy link
Contributor

PR types

Others

PR changes

Others

Description

#60436
注册算子all_reduce

Copy link

paddle-bot bot commented Mar 11, 2024

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

@paddle-bot paddle-bot bot added the contributor External developers label Mar 11, 2024
@xiaoyewww
Copy link
Contributor Author

@kangguangli 麻烦问一下问一下all_reduce在旧ir下的定义在呢,似乎没看AllReduceOp和AllReduceOpMaker

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Mar 12, 2024
@kangguangli
Copy link
Contributor

@kangguangli 麻烦问一下问一下all_reduce在旧ir下的定义在呢,似乎没看AllReduceOp和AllReduceOpMaker

大部分静态图算子的定义是经由代码生成机制产生的,我们只需要配置yaml即可,部分静态图独有算子如 all_reduce定义在paddle/phi/api/yaml/static_ops.yaml中。这下我们只要把定义粘贴到pir下的yaml即可。

顺便一提,生成的定义,即AllReduceOp和AllReduceOpMaker在编译后得到的paddle/fluid/operators/generated_static_op.cc中。

@@ -120,6 +120,7 @@

NO_NEED_GEN_STATIC_ONLY_APIS = [
'add_n_',
'all_reduce',
Copy link
Contributor

@xingmingyyj xingmingyyj Mar 13, 2024

Choose a reason for hiding this comment

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

Suggested change
'all_reduce',
'all_reduce',
'all_reduce_',

这个op有inplace属性,会自动生成all_reduce_,所以需要把all_reduce_加入

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改,多谢~

@xiaoyewww
Copy link
Contributor Author

@kangguangli 麻烦问一下问一下all_reduce在旧ir下的定义在呢,似乎没看AllReduceOp和AllReduceOpMaker

大部分静态图算子的定义是经由代码生成机制产生的,我们只需要配置yaml即可,部分静态图独有算子如 all_reduce定义在paddle/phi/api/yaml/static_ops.yaml中。这下我们只要把定义粘贴到pir下的yaml即可。

顺便一提,生成的定义,即AllReduceOp和AllReduceOpMaker在编译后得到的paddle/fluid/operators/generated_static_op.cc中。

已修改,多谢~

@kangguangli kangguangli merged commit d24719a into PaddlePaddle:develop Mar 14, 2024
30 checks passed
@xiaoyewww xiaoyewww deleted the pir/all_reduce branch May 10, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants