mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Fix distributed flag bug w/ flex device handling
This commit is contained in:
parent
bee0471f91
commit
a08b57e801
@ -92,6 +92,7 @@ def init_distributed_device(args):
|
||||
args.world_size = result['world_size']
|
||||
args.rank = result['global_rank']
|
||||
args.local_rank = result['local_rank']
|
||||
args.distributed = args.world_size > 1
|
||||
device = torch.device(args.device)
|
||||
return device
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user