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

MPI+SparseTimeFunction: More efficient _dist_gather #1013

Open
FabioLuporini opened this issue Nov 25, 2019 · 3 comments
Open

MPI+SparseTimeFunction: More efficient _dist_gather #1013

FabioLuporini opened this issue Nov 25, 2019 · 3 comments

Comments

@FabioLuporini
Copy link
Contributor

In the context of checkpointing, it's a significant overhead that upon returning from C-land we redistribute the entire SparseTimeFunction while potentially only a relatively small number of time iterations have been computed

This should be easily fixable by plumbing the args down to _arg_apply and then to _dist_gather so that we only retain the written region of the data array

@tjb900
Copy link
Contributor

tjb900 commented Nov 25, 2019

Probably a very similar fix if so, but does this potentially apply to _dist_scatter before going to C also?

@mloubout
Copy link
Contributor

Should we drop the "gather" completely and only scatter once and be done?

@FabioLuporini
Copy link
Contributor Author

I think there might be side effects if one expects certain data to be on a certain rank while it actually is somewhere else.

Perhaps we can:

  • scatter upon startup (ie very first SparseFunction initialization)
  • gather on-the-fly each time sf.data is accessed (ie we return a view)

this way would be basically 0 overhead during forward and backward propagation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants