set dp as default backend

This commit is contained in:
William Falcon 2019-07-18 11:31:45 -04:00
parent 2096a0aa84
commit c163caf8cb
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,7 @@ class LightningDataParallel(DataParallel):
"""
def parallel_apply(self, replicas, inputs, kwargs):
print('LDP')
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
@ -55,6 +56,7 @@ class LightningDistributedDataParallel(DistributedDataParallel):
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
def forward(self, *inputs, **kwargs):
print('LDDP')
self._sync_params()
if self.device_ids:
inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)