Add accelerator API to RPC distributed examples: ddp_rpc, parameter_server, rnn#1371
Merged
Conversation
Signed-off-by: jafraustro <jaime.fraustro.valdez@intel.com>
- ddp_rpc - parameter_server - rnn Signed-off-by: jafraustro <jaime.fraustro.valdez@intel.com>
✅ Deploy Preview for pytorch-examples-preview canceled.
|
Contributor
|
failing CI |
Signed-off-by: jafraustro <jaime.fraustro.valdez@intel.com>
Contributor
Author
|
I added numpy to requirement.txt files |
Contributor
|
still failing :D |
- Added a function to verify minimum GPU count before execution. - Updated HybridModel initialization to use rank instead of device. - Ensured proper cleanup of the process group to avoid resource leaks. - Added exit message if insufficient GPUs are detected. Signed-off-by: jafraustro <jaime.fraustro.valdez@intel.com>
Contributor
Author
|
Hi @soumith, DDP step needs two gpu's. Fix:
|
dvrogozh
reviewed
Jul 23, 2025
| @@ -1 +1,2 @@ | |||
| torch>=1.6.0 | |||
| torch>=2.7.1 | |||
Contributor
There was a problem hiding this comment.
why 2.7.1 instead of 2.7? Were there any fixes in 2.7.1 which we need in this example?
Contributor
Author
There was a problem hiding this comment.
There are not
Rolling back to 2.7.0.
dvrogozh
reviewed
Jul 23, 2025
| else: | ||
| device = torch.device("cpu") | ||
| backend = torch.distributed.get_default_backend_for_device(device) | ||
| torch.accelerator.device_index(rank) |
Contributor
There was a problem hiding this comment.
how setting torch.accelerator.device_index(rank) works for "cpu"? why it's not under torch.accelerator.is_available()?
Contributor
Author
There was a problem hiding this comment.
Remove CPU execution option since DDP requires 2 GPUs for this example.
- Remove CPU execution option since DDP requires 2 GPUs for this example. - Refine README.md for DDP RPC example clarity and detail Signed-off-by: jafraustro <jaime.fraustro.valdez@intel.com>
Contributor
|
thanks! |
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.
Add accelerator API to RPC distributed examples:
CC: @soumith