Remove duplicate code (#17708)

This commit is contained in:
Kyungmin Lee 2022-06-22 04:30:40 +09:00 committed by GitHub
parent 26a6a42608
commit 3ccff0d400
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1408,8 +1408,7 @@ class T5Model(T5PreTrainedModel):
)
hidden_states = encoder_outputs[0]
if self.model_parallel:
torch.cuda.set_device(self.decoder.first_device)
# Set device for model parallelism
if self.model_parallel:
torch.cuda.set_device(self.decoder.first_device)