enable misc test cases on XPU (#38852)

* enable misc test cases on XPU

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

* fix style

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

* tweak bamba ground truth on XPU

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

* remove print

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

* one more

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

* fix style

Signed-off-by: YAO Matrix <matrix.yao@intel.com>

---------

Signed-off-by: YAO Matrix <matrix.yao@intel.com>
This commit is contained in:
Yao Matrix
2025-06-18 15:20:49 +08:00
committed by GitHub
parent d058f81e5b
commit 3526e25d3d
10 changed files with 40 additions and 31 deletions

View File

@@ -21,7 +21,14 @@ import numpy as np
import requests
from packaging import version
from transformers.testing_utils import is_flaky, require_torch, require_torch_gpu, require_vision, slow, torch_device
from transformers.testing_utils import (
is_flaky,
require_torch,
require_torch_accelerator,
require_vision,
slow,
torch_device,
)
from transformers.utils import is_torch_available, is_torchvision_available, is_vision_available
from ...test_image_processing_common import ImageProcessingTestMixin, prepare_image_inputs
@@ -337,7 +344,7 @@ class VitMatteImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase):
)
@slow
@require_torch_gpu
@require_torch_accelerator
@require_vision
def test_can_compile_fast_image_processor(self):
# override as trimaps are needed for the image processor