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

[NewIR] support c_sync_calc_stream/c_sync_comm_stream/send_v2/recv_v2 #56557

Merged
merged 11 commits into from
Aug 29, 2023

Conversation

zhaoyinglia
Copy link
Contributor

@zhaoyinglia zhaoyinglia commented Aug 23, 2023

PR types

New features

PR changes

OPs

Description

Pcard-67164

  • NewIR support fluid op c_sync_calc_stream/c_sync_comm_stream/send_v2/recv_v2

@zhaoyinglia zhaoyinglia reopened this Aug 25, 2023
@@ -263,7 +286,15 @@ def _gen_one_impl(self, op_info, op_name):
attr_name_list = op_info.attribute_name_list
mutable_attr_name_list = op_info.mutable_attribute_name_list
no_mutable_attr_name_list = op_info.non_mutable_attribute_name_list
if len(mutable_attr_name_list) > 0:

if op_name == "send_v2":
Copy link
Contributor

@0x45f 0x45f Aug 28, 2023

Choose a reason for hiding this comment

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

output_name_list = op_info.output_name_list
if len(output_name_list) == 0:
    xxx

这里是不是可以修改成上面的代码,通过输出个数判断,而不是名字判断, 这样如果后面还有0输出的api也可以正常生成

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix in the next PR.

Comment on lines +76 to +81
void SendV2InferMeta(const int peer, const int ring_id);

void RecvV2InferMeta(int peer,
DataType dtype,
const std::vector<int>& out_shape,
MetaTensor* out);
Copy link
Contributor

Choose a reason for hiding this comment

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

image

这两个InferMeta函数要放在nullary.h/cc文件中,后续再提个PR改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. 下个PR修改!

@zyfncg zyfncg merged commit 0ce66c1 into PaddlePaddle:develop Aug 29, 2023
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
…PaddlePaddle#56557)

* [AutoParallel][NewIR] support calc_sync/comm_sync/send_v2/recv_v2

* pre-commit

* rm unittest

* tiny fix

* api_gen support send_v2's output is empty

* fix format

* python_c_gen support send_v2
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