Skip to content

Conversation

@chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Aug 28, 2020

PR types

Function optimization

PR changes

APIs

Describe

Remove backend argument of init_parallel_env, reason:

image

related PR: #26044

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@chenwhql chenwhql requested a review from guru4elephant August 28, 2020 08:37
# directly, if they want to switch default place,
# they need to call a function to change default place,
# here just set correctly place to users
place = core.CUDAPlace(ParallelEnv().device_id)
Copy link
Member

Choose a reason for hiding this comment

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

Can I call this function with CPU whl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thx, add cuda check for this function

XiaoguangHu01
XiaoguangHu01 previously approved these changes Aug 31, 2020
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

guru4elephant
guru4elephant previously approved these changes Aug 31, 2020
Copy link
Member

@guru4elephant guru4elephant left a comment

Choose a reason for hiding this comment

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

LGTM, I think init_parallel_env() can be used in CPU whl, the difference is we init gloo related functions. For GPU whl, we'd better init both nccl and gloo for compatibility of cpu/gpu collective operators. @sandyhouse @chenwhql please improve this function in the following updates.

@chenwhql
Copy link
Contributor Author

LGTM, I think init_parallel_env() can be used in CPU whl, the difference is we init gloo related functions. For GPU whl, we'd better init both nccl and gloo for compatibility of cpu/gpu collective operators. @sandyhouse @chenwhql please improve this function in the following updates.

thx, of course, we should support init CPU parallel env in this function later

XiaoguangHu01
XiaoguangHu01 previously approved these changes Aug 31, 2020
Copy link
Contributor

@XiaoguangHu01 XiaoguangHu01 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jzhang533 jzhang533 left a comment

Choose a reason for hiding this comment

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

lgtm

@chenwhql chenwhql merged commit 28cb653 into PaddlePaddle:develop Aug 31, 2020
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.

6 participants