-
Notifications
You must be signed in to change notification settings - Fork 21.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix device type issue in
_get_device_handle
(#124390)
Fix #124327 `device_type`, the first arg of [init_device_mesh()](https://github.com/pytorch/pytorch/blob/a0466061e17358fb621cfde3f85e0bd6d13cfc55/torch/distributed/device_mesh.py#L503), does not support types with indexes, such as `cuda:0`. If `cuda:0` is used as a parameter, `_get_device_handle()` will not correctly return `torch.cuda`. So the exception should be thrown before creating DeviceMesh object. > See #124327 (comment), Pull Request resolved: #124390 Approved by: https://github.com/wz337, https://github.com/wanchaol
- Loading branch information
1 parent
5e5f890
commit e0d2c24
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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