Skip to content

Commit

Permalink
Revert "fix distributed tests with pt main (#1452)"
Browse files Browse the repository at this point in the history
This reverts commit 8d1637f.
  • Loading branch information
IvanYashchuk committed Nov 26, 2024
1 parent 81f83f3 commit 99c6fab
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions thunder/tests/distributed/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from functools import partial
from functools import wraps
from typing import ClassVar, TYPE_CHECKING
import inspect
import math
import os
import sys
Expand Down Expand Up @@ -130,14 +129,10 @@ def _run(cls, rank, test_name, file_name, pipe, *, fake_pg=False):
local_rank = self.rank % torch.cuda.device_count()
torch.cuda.set_device(local_rank)
os.environ["LOCAL_RANK"] = str(local_rank)
if "destroy_process_group" in inspect.signature(self.run_test).parameters:
run_test_kwargs = {"destroy_process_group": False}
else:
run_test_kwargs = {}

torch.distributed.barrier()
try:
self.run_test(test_name, pipe, **run_test_kwargs)
self.run_test(test_name, pipe)
except Exception:
raise
finally:
Expand Down

0 comments on commit 99c6fab

Please sign in to comment.