Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def training_step(self, batch, batch_idx):
tensor_shape=tensor_shape,
decoder_sequence_length=decoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
grad_scaler=self.trainer.precision_plugin.scaler if self.cfg.precision == 16 else None,
custom_sync_context_handler=custom_sync_context_handler,
)
Expand All @@ -349,6 +350,7 @@ def training_step(self, batch, batch_idx):
tensor_shape=tensor_shape,
decoder_sequence_length=decoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
grad_scaler=self.trainer.precision_plugin.scaler if self.cfg.precision == 16 else None,
custom_sync_context_handler=custom_sync_context_handler,
)
Expand Down Expand Up @@ -657,6 +659,7 @@ def validation_step_logits(self, batch, batch_idx):
tensor_shape=tensor_shape,
decoder_sequence_length=decoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
grad_scaler=self.trainer.precision_plugin.scaler if self.cfg.precision == 16 else None,
)
else:
Expand All @@ -668,6 +671,7 @@ def validation_step_logits(self, batch, batch_idx):
tensor_shape=tensor_shape,
decoder_sequence_length=decoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
grad_scaler=self.trainer.precision_plugin.scaler if self.cfg.precision == 16 else None,
)

Expand Down Expand Up @@ -700,6 +704,7 @@ def validation_step(self, batch, batch_idx):
tensor_shape=tensor_shape,
decoder_sequence_length=decoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
grad_scaler=self.trainer.precision_plugin.scaler if self.cfg.precision == 16 else None,
)
else:
Expand All @@ -711,6 +716,7 @@ def validation_step(self, batch, batch_idx):
tensor_shape=tensor_shape,
decoder_sequence_length=decoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
grad_scaler=self.trainer.precision_plugin.scaler if self.cfg.precision == 16 else None,
)

Expand Down Expand Up @@ -951,7 +957,7 @@ def setup_validation_data(self, cfg):
if hasattr(self, '_validation_ds'):
consumed_samples = 0
self._validation_dl = self.build_pretraining_data_loader(
self._validation_ds, consumed_samples, num_workers=0
self._validation_ds, consumed_samples, num_workers=self._cfg.data.num_workers
)

def setup_test_data(self, cfg):
Expand Down Expand Up @@ -1042,6 +1048,7 @@ def dummy():
tensor_shape=tensor_shape,
decoder_sequence_length=encoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
)
else:
output_tensor = forward_backward_no_pipelining(
Expand All @@ -1052,6 +1059,7 @@ def dummy():
tensor_shape=tensor_shape,
decoder_sequence_length=encoder_seq_length,
dtype=self.autocast_dtype,
sync_batch_comm=self.cfg.get('sync_batch_comm', False),
)

if output_tensor:
Expand Down