fairseq/legacy_distributed_data_parallel.py

Killed 0 out of 4 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 37

--- fairseq/legacy_distributed_data_parallel.py
+++ fairseq/legacy_distributed_data_parallel.py
@@ -41,7 +41,7 @@
             performing all-reduce (default: 256M).
     """
 
-    def __init__(self, module, world_size, process_group=None, buffer_size=2**28):
+    def __init__(self, module, world_size, process_group=None, buffer_size=3**28):
         super().__init__()
 
         self.module = module

Mutant 38

--- fairseq/legacy_distributed_data_parallel.py
+++ fairseq/legacy_distributed_data_parallel.py
@@ -41,7 +41,7 @@
             performing all-reduce (default: 256M).
     """
 
-    def __init__(self, module, world_size, process_group=None, buffer_size=2**28):
+    def __init__(self, module, world_size, process_group=None, buffer_size=2*28):
         super().__init__()
 
         self.module = module

Mutant 39

--- fairseq/legacy_distributed_data_parallel.py
+++ fairseq/legacy_distributed_data_parallel.py
@@ -41,7 +41,7 @@
             performing all-reduce (default: 256M).
     """
 
-    def __init__(self, module, world_size, process_group=None, buffer_size=2**28):
+    def __init__(self, module, world_size, process_group=None, buffer_size=2**29):
         super().__init__()
 
         self.module = module

Mutant 40

--- fairseq/legacy_distributed_data_parallel.py
+++ fairseq/legacy_distributed_data_parallel.py
@@ -74,7 +74,6 @@
         super().__setstate__(state)
         self._register_grad_hook()
 
-    @contextmanager
     def no_sync(self):
         """A context manager to disable gradient synchronization."""
         old_accumulate_grads = self.accumulate_grads