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

Enable P2P memory copy #9190

Merged
merged 2 commits into from
Mar 19, 2018
Merged

Enable P2P memory copy #9190

merged 2 commits into from
Mar 19, 2018

Conversation

panyx0718
Copy link
Contributor

On k40 with 4 devices, time reduces from ~4.0 to ~3.8+, should be
more obvious on better hardware

PADDLE_ENFORCE(cudaDeviceCanAccessPeer(&can_acess, i, j),
"Failed to test P2P access.");
if (can_acess != 1) {
VLOG(1) << "Cannot enable P2P access from " << i << " to " << j;
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be better to use LOG(WARNING).

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. VLOG for debugging only. #5181
LOG(WARNING) is better here.

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

VLOG(1) << "Cannot enable P2P access from " << i << " to " << j;
} else {
cudaSetDevice(i);
cudaDeviceEnablePeerAccess(j, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is P2P Access need any specific hardware? I vaguely remember that it needs the slim-connect(or something)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It needs to be tesla. So gforce titan x doesn't support it

PADDLE_ENFORCE(cudaDeviceCanAccessPeer(&can_acess, i, j),
"Failed to test P2P access.");
if (can_acess != 1) {
VLOG(1) << "Cannot enable P2P access from " << i << " to " << j;
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. VLOG for debugging only. #5181
LOG(WARNING) is better here.

On k40 with 4 devices, time reduces from ~4.0 to ~3.8+, should be
more obvious on better hardware
Copy link
Contributor

@dzhwinter dzhwinter left a comment

Choose a reason for hiding this comment

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

LGTM

@panyx0718 panyx0718 merged commit 898e0ff into PaddlePaddle:develop Mar 19, 2018
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