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
Bug/568 get halo behaviour if no data on process #631
Bug/568 get halo behaviour if no data on process #631
Conversation
Codecov Report
@@ Coverage Diff @@
## master #631 +/- ##
=======================================
Coverage 97.38% 97.39%
=======================================
Files 87 87
Lines 16758 16802 +44
=======================================
+ Hits 16320 16364 +44
Misses 438 438
Continue to review full report at Codecov.
|
heat/core/dndarray.py
Outdated
prev_rank = rank - 1 | ||
last_rank = size - 1 | ||
|
||
# if local shape is zero and its the last process or the next one is also zero we can exit here |
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.
You want to be checking if a DNDarray is balanced here. Otherwise you could hypothetically have 2 empty processes and then some data on one of the next ones.
On the other hand, if a DNDarray is balanced and lshape[split] on rank is 0, you don't need to check the next rank.
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.
@ClaudiaComito What is the desired behavior if there are empty ranks in the middle? Preventing the halo all together, or skipping the empty ranks and using the next/prev non-empty rank?
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.
Hi @lucaspataro, that's an interesting question. I think so far we're assuming that operations are performed on balanced DNDarrays, in that case the empty ranks will always be at the end. I would say that for now an empty rank "in the middle" is an edge case we don't really need to worry about. What do you think, @krajsek ?
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.
Hi @ClaudiaComito, i added a RuntimeError if tensor is not balanced and removed the check for empty next rank like you suggested.
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.
This looks good to me, thanks for fixing this. I have updated test_percentile to include a test with no data on process.
I have one change request.
bump, requested changes and conflict resolution |
GPU cluster tests are currently disabled on this Pull Request. |
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.
Great, thanks a lot!
Description
Issue/s resolved: #568
Empty ranks at the end of the communicator are now ignored.
Type of change
Due Diligence
Does this change modify the behaviour of other functions? If so, which?
no