Adding torch accelerator to FSDP2 example#36
Open
dggaytan wants to merge 1 commit into
Open
Conversation
Owner
|
Add the examples to the CI you can do something similar to this -> https://github.com/pytorch/examples/pull/1364/files#diff-ea329c10af35989ab732dc10a3dc98101f71c7fc96f1d8e186cba9088f33a216 |
b43765f to
959f8bf
Compare
Collaborator
Author
|
@jafraustro done, can you please take a look? before opening PR to mainstream |
jafraustro
requested changes
Jul 12, 2025
240e295 to
68972e8
Compare
jafraustro
requested changes
Jul 15, 2025
68972e8 to
97165f0
Compare
jafraustro
approved these changes
Jul 17, 2025
| parser.add_argument("--mixed-precision", action="store_true", default=False) | ||
| parser.add_argument("--dcp-api", action="store_true", default=False) | ||
| args = parser.parse_args() | ||
| _min_gpu_count = 2 |
Owner
There was a problem hiding this comment.
This would be better at the beginning of the main function
Comment on lines
+9
to
+10
| echo "Launching ${1:-example.py} with ${2:-4} gpus" | ||
| torchrun --nnodes=2 --nproc_per_node=${2:-4} ${1:-example.py} |
Owner
There was a problem hiding this comment.
Suggested change
| echo "Launching ${1:-example.py} with ${2:-4} gpus" | |
| torchrun --nnodes=2 --nproc_per_node=${2:-4} ${1:-example.py} | |
| echo "Launching ${1:-example.py} with ${2:-2} gpus" | |
| torchrun ---nproc_per_node=${2:2} ${1:-example.py} |
- you are asking for 2 gpu in the
verify_min_gpu_countfunction. - remove
--nnodes=2that is for multi node training. That is not possible with the current CI
d452326 to
3d54e15
Compare
Signed-off-by: dggaytan <diana.gaytan.munoz@intel.com>
1f0d7d3 to
5e960d8
Compare
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.
Updating train.py FSDP2 script to use accelerator