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

Matrix Data Reshuffling (matrix re-distribute) #933

Merged
merged 12 commits into from
Jul 26, 2023

Conversation

albestro
Copy link
Collaborator

Close #919

Simple implementation of a copy function that allows to re-distribute a matrix with a different tile size.

Currently, we concentrated on a small subset of configurations by adding some constraints, that should not represent a problem for the use-cases we'd like to try, but simplify the first implementation.

Constraints:

  • ranks(grid_in) == ranks(grid_out)
  • tileSize can be down/up scaled by an integral factor (each axis is independent, e.g. row axis down-scaled and col-axis up-scaled)

Note:
Current implementation uses RetiledMatrix (which simplifies the work a lot!), which we know it is a temporary solution waiting for the refactoring. For this reason, I had to relax the const-correctness of the input arguments of the new copy function, because currently RetiledMatrix<const T> is not supported.

@albestro albestro self-assigned this Jul 11, 2023
@albestro albestro added this to the Optimizations milestone Jul 11, 2023
Copy link
Collaborator

@msimberg msimberg left a comment

Choose a reason for hiding this comment

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

Just a couple of initial comments. Sorry if you were already planning to handle them.

include/dlaf/matrix/copy.h Outdated Show resolved Hide resolved
include/dlaf/matrix/copy.h Outdated Show resolved Hide resolved
include/dlaf/matrix/copy.h Outdated Show resolved Hide resolved
@albestro albestro marked this pull request as ready for review July 13, 2023 08:11
test/unit/matrix/test_matrix.cpp Outdated Show resolved Hide resolved
test/unit/matrix/test_matrix.cpp Outdated Show resolved Hide resolved
@albestro albestro force-pushed the alby/matrix-data-reshuffling branch from b02a104 to 50f89dc Compare July 19, 2023 15:52
@albestro
Copy link
Collaborator Author

After #935 got merged, it was a quick change to move from retiled to matrix and I was also able to fix const-correctness 😉

Apart small details, this should be ready for final review.

@albestro albestro requested a review from rasolca July 19, 2023 15:57
@msimberg
Copy link
Collaborator

cscs-ci run

@rasolca
Copy link
Collaborator

rasolca commented Jul 24, 2023

There are deadlocks in the CUDA tests.

@albestro albestro marked this pull request as draft July 24, 2023 09:28
@albestro
Copy link
Collaborator Author

cscs-ci run

@albestro albestro force-pushed the alby/matrix-data-reshuffling branch from 4afd7f2 to beea7e1 Compare July 24, 2023 16:15
@albestro
Copy link
Collaborator Author

cscs-ci run

@codecov-commenter
Copy link

Codecov Report

Merging #933 (beea7e1) into master (f78e3d9) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master     #933      +/-   ##
==========================================
+ Coverage   93.30%   93.34%   +0.03%     
==========================================
  Files         135      135              
  Lines        8397     8440      +43     
  Branches     1085     1089       +4     
==========================================
+ Hits         7835     7878      +43     
  Misses        386      386              
  Partials      176      176              
Impacted Files Coverage Δ
include/dlaf/matrix/copy.h 98.18% <100.00%> (+6.51%) ⬆️

@albestro albestro marked this pull request as ready for review July 25, 2023 14:21
@albestro albestro requested a review from msimberg July 25, 2023 14:22
@rasolca rasolca merged commit df5ae82 into master Jul 26, 2023
@rasolca rasolca deleted the alby/matrix-data-reshuffling branch July 26, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Implement matrix redistribution algorithm
4 participants