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

matmul: modify split 10 case to avoid possible memory issues #360

Open
coquelin77 opened this issue Aug 13, 2019 · 4 comments
Open

matmul: modify split 10 case to avoid possible memory issues #360

coquelin77 opened this issue Aug 13, 2019 · 4 comments

Comments

@coquelin77
Copy link
Member

Related
currently the 10 functionality of matmul creates a matrix which is the size of the result on each process. this can be very dangerous if there is not enough memory.

Feature functionality
An update is needed to apply blocking to the split 10 case so that the memory of the nodes is not stretched quite so much.

Additional context
the blocking sizes should be based on the result of the split sizes of the output not of the inputs, it should be clear why this is a special case and not the general rule

@coquelin77 coquelin77 self-assigned this Aug 13, 2019
@ClaudiaComito
Copy link
Contributor

Is this still relevant @coquelin77 ?

@ClaudiaComito
Copy link
Contributor

I'm not sure we need to provide this functionality.

If just for convenience, then I'd say an in-place resplit of the input matrices (from 1-0 to 0-1) would be better than having a matrix the size of the result on each process.

Thoughts @coquelin77 @mrfh92 ?


Reviewed within #1109

@ClaudiaComito ClaudiaComito added this to the 1.4.0 milestone Aug 11, 2023
@mrfh92
Copy link
Collaborator

mrfh92 commented Aug 11, 2023

I think there could be several options:

  • Follow Claudias idea. To do so, I think we need to discuss the following:
    • If we stick to the current rule that the output split equals the split of the first factor of the product, we would have to introduce another resplit after multiplying.
    • Also, if we in-place resplit the first factor, this factor is either modified (which would be a strange side effect of matmul then) or a copy is taken which causes memory consumption again.
    • Another option could be, to do this resplit if and only if the size of the result matrix exceeds a certain limit (e.g. the size of the inputs or sth like that) and to keep the current version for "small" outputs.
  • having a look on the 10 case and try to modify the algorithm (no guarantee that we find sth better than the current implementation - this is maybe one of the few limitations due to the slicing along a single dimension...)

@ClaudiaComito ClaudiaComito assigned mrfh92 and FOsterfeld and unassigned coquelin77 Nov 27, 2023
Copy link
Contributor

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

4 participants