Skip to content

Conversation

@d4l3k
Copy link
Member

@d4l3k d4l3k commented May 1, 2025

This makes torchft's ProcessGroupGloo correctly support CUDA tensors so we can use Gloo with torchtitan for allreduces.

I also found a bug in Gloo, apparently torchft's test suite is more in depth than the one in core haha pytorch/pytorch#152645

Test plan:

torchtitan on remote cluster

pytest torchft/process_group_test.py -k gloo_apis

@d4l3k d4l3k requested a review from H-Huang May 1, 2025 23:35
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 1, 2025
@d4l3k d4l3k requested a review from fegin May 1, 2025 23:39
Copy link
Contributor

@H-Huang H-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool! I also wonder if it would be possible to use torchtitan for cpu-only training. That could be cool to show a demo on a single host

@fegin
Copy link
Contributor

fegin commented May 2, 2025

@H-Huang ye, I'm also wondering if we can do CPU training. But I'm not sure if FSDP can work with CPU memory.

@d4l3k
Copy link
Member Author

d4l3k commented May 2, 2025

I've only tested this with HSDP using NCCL for most of titan and only Gloo+CUDA for the allreduce

Gloo does CPU blocking so I expect that we'll have some significant performance hit since this won't overlap compute+networking. I have some thoughts on how to work around that but tbd

@d4l3k d4l3k merged commit 93c230b into main May 2, 2025
8 checks passed
@d4l3k d4l3k deleted the d4l3k/recover_errors branch May 2, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants