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

Add Gloo Gather Function #52334

Merged
merged 13 commits into from
Apr 4, 2023
Merged

Add Gloo Gather Function #52334

merged 13 commits into from
Apr 4, 2023

Conversation

isky-cd
Copy link
Contributor

@isky-cd isky-cd commented Mar 30, 2023

PR types

New features

PR changes

OPs

Describe

Add Gloo Gather Function

@paddle-bot
Copy link

paddle-bot bot commented Mar 30, 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.

kuizhiqing
kuizhiqing previously approved these changes Mar 31, 2023
Copy link
Member

@kuizhiqing kuizhiqing left a comment

Choose a reason for hiding this comment

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

lgtm

task.wait()

test_gather(0)
test_gather(1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

You assume that this ut would only run when world size is 2. If world size is not 2, this ut does not work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -61,8 +61,6 @@ class SendRecvOptions {

friend void send_recv(SendRecvOptions*);
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

You do not need to rename this file. Rename it back.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

const phi::DenseTensor& in_tensor,
const GatherOptions& opts,
bool sync_op,
bool use_calc_stream) {
Copy link
Collaborator

@sneaxiy sneaxiy Apr 4, 2023

Choose a reason for hiding this comment

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

Throw exception when use_calc_stream is true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -210,6 +216,11 @@ class ProcessGroupGloo : public ProcessGroupWithoutStream {
return platform::DeviceContextPool::Instance().Get(place);
}

phi::DeviceContext* GetDeviceContext(const Place& place,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do not need this method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

An exception will be thrown if this method is not used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I add an exception when use_calc_stream is true.

@sneaxiy sneaxiy merged commit 5f6376b into PaddlePaddle:develop Apr 4, 2023
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