fix UT failures on XPU w/ stock PyTorch 2.7 & 2.8 (#39116)

* fix UT failures on XPU w/ stock PyTorch 2.7 & 2.8

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

* zamba2

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

* xx

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

* internvl

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

* tp cases

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-30 17:49:03 +08:00
committed by GitHub
parent ccf2ca162e
commit 2100ee6545
8 changed files with 119 additions and 51 deletions

View File

@@ -24,7 +24,7 @@ from transformers.testing_utils import (
backend_device_count,
get_torch_dist_unique_port,
require_huggingface_hub_greater_or_equal,
require_torch_multi_gpu,
require_torch_multi_accelerator,
torch_device,
)
@@ -168,6 +168,6 @@ class TestTensorParallel(TestCasePlus):
del non_tp_tensor, tp_tensor
@require_torch_multi_gpu
class TestTensorParallelCuda(TestTensorParallel):
@require_torch_multi_accelerator
class TestTensorParallelAccelerator(TestTensorParallel):
nproc_per_node = backend_device_count(torch_device)