[tests] make more tests device-agnostic (#33580)
* enable * fix * add xpu skip * add marker * skip for xpu * add more * enable on accelerator * add more cases * add more tests * add more
This commit is contained in:
@@ -29,6 +29,7 @@ from transformers.testing_utils import (
|
||||
require_flash_attn,
|
||||
require_read_token,
|
||||
require_torch,
|
||||
require_torch_accelerator,
|
||||
require_torch_gpu,
|
||||
require_torch_sdpa,
|
||||
slow,
|
||||
@@ -719,14 +720,14 @@ class MistralIntegrationTest(unittest.TestCase):
|
||||
|
||||
|
||||
@slow
|
||||
@require_torch_gpu
|
||||
@require_torch_accelerator
|
||||
class Mask4DTestHard(unittest.TestCase):
|
||||
model_name = "mistralai/Mistral-7B-v0.1"
|
||||
_model = None
|
||||
|
||||
def tearDown(self):
|
||||
gc.collect()
|
||||
torch.cuda.empty_cache()
|
||||
backend_empty_cache(torch_device)
|
||||
|
||||
@property
|
||||
def model(self):
|
||||
|
||||
Reference in New Issue
Block a user