Skip to content

Commit 357a9d4

Browse files
Fix distributed issue for timm (#1653)
Co-authored-by: regisss <[email protected]>
1 parent 1db6864 commit 357a9d4

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

examples/pytorch-image-models/train_hpu_graph.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,10 +635,6 @@ def _parse_args():
635635
return args, args_text
636636

637637

638-
def setup():
639-
dist.init_process_group(backend="hccl")
640-
641-
642638
def cleanup():
643639
dist.destroy_process_group()
644640

@@ -663,8 +659,6 @@ def main():
663659
device = torch.device("hpu")
664660

665661
if args.distributed:
666-
setup()
667-
668662
_logger.info(
669663
"Training in distributed mode with multiple processes, 1 device per process."
670664
f"Process {args.rank}, total {args.world_size}, device {args.device}."

examples/pytorch-image-models/train_hpu_lazy.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -637,10 +637,6 @@ def _parse_args():
637637
return args, args_text
638638

639639

640-
def setup():
641-
dist.init_process_group(backend="hccl")
642-
643-
644640
def cleanup():
645641
dist.destroy_process_group()
646642

@@ -665,8 +661,6 @@ def main():
665661
device = torch.device("hpu")
666662

667663
if args.distributed:
668-
setup()
669-
670664
_logger.info(
671665
"Training in distributed mode with multiple processes, 1 device per process."
672666
f"Process {args.rank}, total {args.world_size}, device {args.device}."

0 commit comments

Comments
 (0)