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

Avoid memory copy for splitting grad and merging param in distributed training #9675

Closed
emailweixu opened this issue Apr 5, 2018 · 1 comment
Assignees

Comments

@emailweixu
Copy link
Collaborator

Currently, for distributed training, gradients are splitted before send_op and the parameters are concatenated after the send_op. Both of these two steps require additional memory copy and memory usage. We should share the memory between the original gradients and splitted gradients, and between splitted parameter and original parameter.

One possible way to do this is to add another operator similar to split_op, but using Tensor::slice() to share the memory with the input.

@typhoonzero
Copy link
Contributor

Thanks very much for reminding. we'll try fix this~

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

No branches or pull requests

4 participants