mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Remove duplicate code (#17708)
This commit is contained in:
parent
26a6a42608
commit
3ccff0d400
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user