Revert "Update ddp_spawn.py"

This reverts commit f17210183b.
This commit is contained in:
shuyingsunshine21 2021-03-24 02:06:55 -07:00
parent 6c095b2370
commit 8222dc98ea
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import torch.distributed as torch_distrib
import torch.multiprocessing as mp
from torch.nn.parallel.distributed import DistributedDataParallel
from torch.optim import Optimizer
import numpy
from pytorch_lightning.distributed.dist import LightningDistributed
from pytorch_lightning.overrides import LightningDistributedModule
@ -78,6 +79,7 @@ class DDPSpawnPlugin(ParallelPlugin):
def setup(self, model):
os.environ["MASTER_PORT"] = str(self.cluster_environment.master_port())
os.environ["MKL_SERVICE_FORCE_INTEL"] = "1"
# pass in a state q
smp = mp.get_context("spawn")