mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-22 17:58:56 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
a8840a090f
commit
3629b36517
@ -1326,9 +1326,11 @@ class HybridParallelPlugin(PipelinePluginBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# run with gradients accumulation
|
# run with gradients accumulation
|
||||||
if model.require_grad_sync == False or (
|
if (
|
||||||
isinstance(optimizer, HybridParallelZeroOptimizer) and optimizer.require_grad_sync == False
|
model.require_grad_sync == False
|
||||||
) or not torch.is_grad_enabled():
|
or (isinstance(optimizer, HybridParallelZeroOptimizer) and optimizer.require_grad_sync == False)
|
||||||
|
or not torch.is_grad_enabled()
|
||||||
|
):
|
||||||
return outputs
|
return outputs
|
||||||
|
|
||||||
# Synchronize the grads of shared parameters of the model.
|
# Synchronize the grads of shared parameters of the model.
|
||||||
|
Loading…
Reference in New Issue
Block a user