mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
# Motivation Adapt `torch.accelerator.device_count` for multi-process usage. For example, `torch.cuda.device_count` avoids poisoning fork, then `torch.accelerator.device_count` should meet the same requirement. Now that `torch.get_device_module(device).device_count` supports this, `torch.accelerator.device_count` should align with this behavior as well. Pull Request resolved: https://github.com/pytorch/pytorch/pull/149924 Approved by: https://github.com/albanD ghstack dependencies: #147507 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _utils.py | ||