-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Feature/transpiler split tensor to multiple pservers #7249
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
Feature/transpiler split tensor to multiple pservers #7249
Conversation
return param_grad_map | ||
|
||
|
||
class DistributeTranspiler: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confusing that why we need two DistributeTranspiler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename this class to SimpleDistributeTranspiler
and append to https://github.com/PaddlePaddle/Paddle/blob/develop/python/paddle/v2/fluid/__init__.py#L25
… transpiler_split_tensor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
""" | ||
We may need to split dense tensor to one or several blocks and put | ||
them equally onto parameter server. One block is a sub-tensor | ||
aligned by dim[0] of the tensor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to align by dim[0]
? seems sharding has nothing to do with the shape of the lod tensor. (is this actually for select row tensor?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, that's true, we only need to know the original shape when concat
updated parameters.
Fix #7179
TODO:
SelectedRows
will do in next PR.This PR will use a transpiler to split variable before send to multiple servers, like: