Skip to content

Commit

Permalink
Fix distributed issue for timm (#1653)
Browse files Browse the repository at this point in the history
Co-authored-by: regisss <[email protected]>
  • Loading branch information
ZhengHongming888 and regisss committed Dec 23, 2024
1 parent 1db6864 commit 357a9d4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions examples/pytorch-image-models/train_hpu_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,10 +635,6 @@ def _parse_args():
return args, args_text


def setup():
dist.init_process_group(backend="hccl")


def cleanup():
dist.destroy_process_group()

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

if args.distributed:
setup()

_logger.info(
"Training in distributed mode with multiple processes, 1 device per process."
f"Process {args.rank}, total {args.world_size}, device {args.device}."
Expand Down
6 changes: 0 additions & 6 deletions examples/pytorch-image-models/train_hpu_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,6 @@ def _parse_args():
return args, args_text


def setup():
dist.init_process_group(backend="hccl")


def cleanup():
dist.destroy_process_group()

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

if args.distributed:
setup()

_logger.info(
"Training in distributed mode with multiple processes, 1 device per process."
f"Process {args.rank}, total {args.world_size}, device {args.device}."
Expand Down

0 comments on commit 357a9d4

Please sign in to comment.