[PR 1/6] Collective in Ray #12637
Merged
richardliaw merged 40 commits intoray-project:masterfrom Dec 12, 2020
Merged
Conversation
richardliaw
reviewed
Dec 8, 2020
richardliaw
requested changes
Dec 10, 2020
Contributor
richardliaw
left a comment
There was a problem hiding this comment.
Very exciting! Sorry for the slow response; I'll be sure to review within 24 hours next time.
python/ray/util/collective/collective_group/base_collective_group.py
Outdated
Show resolved
Hide resolved
python/ray/util/collective/collective_group/base_collective_group.py
Outdated
Show resolved
Hide resolved
Comment on lines
+211
to
+212
| opts = types.AllReduceOptions | ||
| opts.reduceOp = op |
Contributor
There was a problem hiding this comment.
doesn't this set the global variable?
can we instead create an instance?
Contributor
Author
There was a problem hiding this comment.
This is an exposed user API: it does not write; It only reads from the global variable _group_mgr.
Contributor
There was a problem hiding this comment.
doesn't types.AllReduceOptions refer to a global setting?
anyways, i think this is a nit :)
richardliaw
reviewed
Dec 12, 2020
Comment on lines
+25
to
+26
| """ | ||
| Initialize the NCCL unique ID for this store. |
Contributor
There was a problem hiding this comment.
nit - in future, this first line should fit on first line of docstring:
"""Initialize the NCCL unique ID for this store.
richardliaw
approved these changes
Dec 12, 2020
This was referenced Dec 15, 2020
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
This is the first PR for the project Collective-in-Ray.
To make each PR more manageable and friendly to reviewers, we break the entire project code into 6 incremental PRs:
See a list below:
1. (This one) Basic infrastructure; an in-actor collective interface
ray.util.collective.init_collective_group(*args, **kwargs); support for two collectivesallreduceandbarrier; some testing infrastructure, etc.2. Driver-program interface, which includes: (1) the second interface:
actor.options(collective_options, ...).remote()and the third interfacedeclare_collective_group(actors, collective_options, ...). See here and there.3. Support for other collectives:
allgather,broadcast, etc.4. Communicator caching, and support for num_gpus > 2 per actor/task.
5. CUDA stream management.
6. docs, examples, etc.
This is the first one (1/6).
MPI support is currently excluded from this series of PRs and will be developed later in another sub-project.
The testing pipeline needs to align with the current Ray CI and release tests. @richardliaw
Related issue number
RFC #12174
Checks
scripts/format.shto lint the changes in this PR.