-
Notifications
You must be signed in to change notification settings - Fork 13
Feature/shrinked edge partitioning #33
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
Conversation
Can one of the admins verify this patch? |
@@ -723,24 +727,49 @@ def tile_extent_from_rank_metadata( | |||
|
|||
|
|||
def rank_extent_from_tile_metadata( | |||
dims: Sequence[str], tile_extent: Sequence[int], layout: Tuple[int, int] | |||
) -> Tuple[int, ...]: | |||
dims: Sequence[str], tile_extent: Sequence[int], subtile_index: Tuple[int, int], |
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.
Seeing this function reminds me - this PR breaks tile_extent_from_rank_metadata
(which was expected). We'll need to remove that routine and modify the scatter/gather routines to determine the target shape exactly, by communicating array shapes over MPI. You can do this as part of your project since it's needed for us to merge it, or someone else can do it since it's not necessarily part of your project.
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.
If all the current tests pass without this change, then it means scatter/gather only breaks when edge_tile_ratio
on the TilePartitioner is not 1. That would mean we can consider merging this code first, then adding a test combining these two features (which would fail) and fixing the code in another PR.
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.
Since you changed the call signature to this routine, could you add new test cases that make use of the new arguments and refactor the existing tests to pass (i.e. provide these new required arguments)?
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.
Done. Scatter/Gather seem to work with an unchanged edge_interior_ratio
as all the current tests are passing.
…ng, added one test case with just one interface dimension
ok to test |
launch jenkins |
…nd fixed current unit tests.
Changes: - `tests/test_partitioner.py` updated to reflect some more advanced assignments. - `subtile_extent` method of Partitioner classes now takes in a required `rank` argument - TilePartitioner has a new `edge_interior_ratio` argument which defaults to 1.0, and lets the user specify the relative 1-dimensional extent of edge and corner compute domains compared to interior compute domains. In all cases, the closest valid value will be used, which enables some previously invalid configurations (e.g. C128 on a 3 by 3 layout will use the closest valid edge_interior_ratio to 1.0) - This can later be used in `TilePartitioner.subtile_slice()` to do custom subdomain partitioning. This PR is replacing #33 with its feature branch moved from my fork to the `pace` repo.
edge_interior_ratio
as an initialization argument forTilePartitioner
.TilePartitioner.subtile_slice()
to do custom subdomain partitioning.This is based on the idea that ranks operating on boundary subdomains should have a smaller domain assigned.
tests/test_partitioner.py
updated to reflect some more advanced assignments.