Skip to content

Commit

Permalink
Update distributed.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Delaunay authored May 13, 2024
1 parent f7aa0a1 commit 8848dad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions timm/utils/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,13 @@ def init_distributed_device_so(
global_rank = 0
local_rank = 0
if dist_backend is None:
# FIXME sane defaults for other device backends?
dist_backend = 'nccl' if 'cuda' in device else 'gloo'
# FIXME: verify that ROCm transform nccl to rccl
dist_backends = {
"xpu": "ccl",
"hpu": "hccl",
"cuda": "nccl",
}
dist_backend = dist_backends.get(device, 'gloo')
dist_url = dist_url or 'env://'

# TBD, support horovod?
Expand Down

0 comments on commit 8848dad

Please sign in to comment.