def _no_sync_in_gradient_accumulation(self):
        """
        Whether or not to use no_sync for the gradients when doing gradient accumulation.
        """
        return not (
            self.deepspeed or is_sagemaker_dp_enabled() or is_sagemaker_mp_enabled() or is_torch_neuroncore_available()
        )

        Whether or not to use no_sync for the gradients when doing gradient accumulation.
        
dpkd/transformers/src/transformers/training_args.py