Commit 13cb21a
Enable split_group API when TorchComms is used as a backend for TorchTitan on XPU (pytorch#178236)
When TP>1 is enabled for TorchTitan models using TorchComms backend, the execution hangs on XPU (new_comms creation times out). Investigation shows that split_group API is being enabled only for cuda device for the same model configuration. This PR makes the calls generic using the accelerator API, and makes TP>1 cases functional on XPU.
Pull Request resolved: pytorch#178236
Approved by: https://github.com/d4l3k, https://github.com/guangyey
Co-authored-by: Yu, Guangye <guangye.yu@intel.com>1 parent 20f1bde commit 13cb21a
2 files changed
Lines changed: 24 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
| 552 | + | |
553 | 553 | | |
554 | 554 | | |
555 | | - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
556 | 558 | | |
557 | 559 | | |
558 | 560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5453 | 5453 | | |
5454 | 5454 | | |
5455 | 5455 | | |
5456 | | - | |
| 5456 | + | |
| 5457 | + | |
| 5458 | + | |
| 5459 | + | |
| 5460 | + | |
| 5461 | + | |
| 5462 | + | |
| 5463 | + | |
| 5464 | + | |
5457 | 5465 | | |
5458 | 5466 | | |
5459 | | - | |
| 5467 | + | |
5460 | 5468 | | |
5461 | 5469 | | |
5462 | 5470 | | |
| |||
5522 | 5530 | | |
5523 | 5531 | | |
5524 | 5532 | | |
5525 | | - | |
| 5533 | + | |
| 5534 | + | |
| 5535 | + | |
| 5536 | + | |
| 5537 | + | |
| 5538 | + | |
| 5539 | + | |
| 5540 | + | |
| 5541 | + | |
| 5542 | + | |
5526 | 5543 | | |
5527 | 5544 | | |
5528 | 5545 | | |
| |||
0 commit comments