Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dygraph] Rename fw_bw func name of interleave pp #47571

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -534,7 +534,7 @@ def _backward_step_helper(self, micro_step):

return input_tensor_grad

def interleave_pipeline(
def forward_backward_pipeline(
self, data, scaler, forward_only=False, compute_loss=True
):
# use interleave scheduling strategy.
Expand Down Expand Up @@ -763,7 +763,7 @@ def interleave_pipeline(
def train_batch(self, data, optimizer, lr_scheduler=None, scaler=None):
data = self._prepare_training(data, optimizer, lr_scheduler)
# interleave scheduler for pipeline parallel
train_loss = self.interleave_pipeline(data, scaler)
train_loss = self.forward_backward_pipeline(data, scaler)

# optimizer
with paddle.amp.auto_cast(enable=False):
Expand All @@ -778,4 +778,4 @@ def eval_batch(self, data, compute_loss=False):
self._layers.eval()
self._compute_loss = compute_loss

return self.interleave_pipeline(data, None, forward_only=True)
return self.forward_backward_pipeline(data, None, forward_only=True)