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

send use pinned memory #10821

Merged
merged 1 commit into from
May 23, 2018
Merged

Conversation

typhoonzero
Copy link
Contributor

Use pinned place when sending. Note that when receiving, we need the RPC library to malloc "CUDA Pinned" memory when receiving data from network, so didn't change that yet.

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

On p40, there is no performance difference between Pinned memory and common memory.

Do we need to add them now?

@typhoonzero
Copy link
Contributor Author

This PR concerns two things:

  1. use "CUDAPinned" memory before sending, copying data from GPU to host will use DMA
  2. "CUDAPinned" is a pool allocator, memory is not actually return to OS after we call memory::Free

@typhoonzero typhoonzero merged commit c8919d8 into PaddlePaddle:develop May 23, 2018
@typhoonzero typhoonzero deleted the use_pinned_memory branch May 23, 2018 06:07
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.

2 participants