enable several cases on XPU (#37516)
* enable several cases on XPU Signed-off-by: YAO Matrix <matrix.yao@intel.com> * Update tests/test_modeling_common.py Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com> * fix style Signed-off-by: YAO Matrix <matrix.yao@intel.com> --------- Signed-off-by: YAO Matrix <matrix.yao@intel.com> Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -3825,7 +3825,7 @@ class ModelTesterMixin:
|
||||
)
|
||||
|
||||
@require_torch_sdpa
|
||||
@require_torch_gpu
|
||||
@require_torch_accelerator
|
||||
@slow
|
||||
def test_sdpa_can_dispatch_on_flash(self):
|
||||
if not self.has_attentions:
|
||||
@@ -3836,8 +3836,8 @@ class ModelTesterMixin:
|
||||
self.skipTest(reason="This test requires an NVIDIA GPU with compute capability >= 8.0")
|
||||
elif device_type == "rocm" and major < 9:
|
||||
self.skipTest(reason="This test requires an AMD GPU with compute capability >= 9.0")
|
||||
else:
|
||||
self.skipTest(reason="This test requires a Nvidia or AMD GPU")
|
||||
elif device_type not in ["cuda", "rocm", "xpu"]:
|
||||
self.skipTest(reason="This test requires a Nvidia or AMD GPU, or an Intel XPU")
|
||||
|
||||
torch.compiler.reset()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user