"tools/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "281f3dc9089372c0c4c4752a2f074686ebb8b6ac"
Unverified Commit 1a5fc300 authored by aws-sangeetha's avatar aws-sangeetha Committed by GitHub
Browse files

Fix case when using --gradient_accumulation_steps with DDP disabled. (#22007)


Co-authored-by: default avatarEC2 Default User <ec2-user@ip-172-31-42-72.us-west-2.compute.internal>
parent 6d9031f2
......@@ -1801,7 +1801,9 @@ class TrainingArguments:
"""
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())
return not (
self.deepspeed or is_sagemaker_dp_enabled() or is_sagemaker_mp_enabled() or is_torch_neuroncore_available()
)
@contextlib.contextmanager
def main_process_first(self, local=True, desc="work"):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment