Multi GPUs

This commit is contained in:
XXXXRT666 2024-08-26 02:13:22 +08:00
parent be200d182a
commit d7001bd9dd

View File

@ -306,7 +306,7 @@ def train_and_evaluate(
y_lengths,
text,
text_lengths,
) in enumerate(tqdm(train_loader,position=rank+1,leave=(epoch==hps.train.epochs),postfix=f'epoch:{epoch}')):
) in enumerate(tqdm(train_loader,position=rank+1,leave=(epoch==hps.train.epochs),postfix=f'epoch:{epoch}',disable=(rank!=0))):
if torch.cuda.is_available():
spec, spec_lengths = spec.cuda(rank, non_blocking=True), spec_lengths.cuda(
rank, non_blocking=True