[tests] add torch.use_deterministic_algorithms for XPU (#30774)

* add xpu check

* add marker

* add documentation

* update doc

* fix ci

* remove from global init

* fix
This commit is contained in:
Fanli Lin
2024-05-23 23:53:07 +08:00
committed by GitHub
parent 8366b57241
commit 21339a5213
6 changed files with 30 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ import unittest
from transformers import SpeechT5Config, SpeechT5HifiGanConfig
from transformers.testing_utils import (
is_torch_available,
require_deterministic_for_xpu,
require_sentencepiece,
require_tokenizers,
require_torch,
@@ -1071,6 +1072,7 @@ class SpeechT5ForTextToSpeechIntegrationTests(unittest.TestCase):
"Shape mismatch between generate_speech and generate methods.",
)
@require_deterministic_for_xpu
def test_one_to_many_generation(self):
model = self.default_model
processor = self.default_processor