enable more test cases on xpu (#38572)

* enable glm4 integration cases on XPU, set xpu expectation for blip2

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

* more

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

* fix style

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

* refine wording

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

* refine test case names

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

* run

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

* add gemma2 and chameleon

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

* fix review comments

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

---------

Signed-off-by: Matrix YAO <matrix.yao@intel.com>
Signed-off-by: YAO Matrix <matrix.yao@intel.com>
This commit is contained in:
Yao Matrix
2025-06-06 15:29:51 +08:00
committed by GitHub
parent 31023b6909
commit 89542fb81c
23 changed files with 150 additions and 72 deletions

View File

@@ -870,7 +870,7 @@ class OmDetTurboModelIntegrationTests(unittest.TestCase):
self.assertListEqual([result["text_labels"] for result in results], expected_text_labels)
@require_torch_accelerator
def test_inference_object_detection_head_equivalence_cpu_gpu(self):
def test_inference_object_detection_head_equivalence_cpu_accelerator(self):
processor = self.default_processor
image = prepare_img()
text_labels, task = prepare_text()
@@ -881,7 +881,7 @@ class OmDetTurboModelIntegrationTests(unittest.TestCase):
with torch.no_grad():
cpu_outputs = model(**encoding)
# 2. run model on GPU
# 2. run model on accelerator
model.to(torch_device)
encoding = encoding.to(torch_device)
with torch.no_grad():