mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Update distributed.py
This commit is contained in:
parent
f7aa0a1a71
commit
8848dad362
@ -109,8 +109,13 @@ def init_distributed_device_so(
|
|||||||
global_rank = 0
|
global_rank = 0
|
||||||
local_rank = 0
|
local_rank = 0
|
||||||
if dist_backend is None:
|
if dist_backend is None:
|
||||||
# FIXME sane defaults for other device backends?
|
# FIXME: verify that ROCm transform nccl to rccl
|
||||||
dist_backend = 'nccl' if 'cuda' in device else 'gloo'
|
dist_backends = {
|
||||||
|
"xpu": "ccl",
|
||||||
|
"hpu": "hccl",
|
||||||
|
"cuda": "nccl",
|
||||||
|
}
|
||||||
|
dist_backend = dist_backends.get(device, 'gloo')
|
||||||
dist_url = dist_url or 'env://'
|
dist_url = dist_url or 'env://'
|
||||||
|
|
||||||
# TBD, support horovod?
|
# TBD, support horovod?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user