[XPU][CI]skip test_preprocess_error_handling due to fork/spawn issue (#31381)

Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
Kunshang Ji
2025-12-27 05:40:44 +08:00
committed by GitHub
parent 87f1b8ca2c
commit 5326c89803

View File

@@ -15,9 +15,10 @@ MODEL_NAME = "hmellor/tiny-random-LlamaForCausalLM"
def test_preprocess_error_handling(monkeypatch: pytest.MonkeyPatch):
"""Test that preprocessing errors are handled gracefully."""
if current_platform.is_rocm():
if current_platform.is_rocm() or current_platform.is_xpu():
pytest.skip(
"Skipped on ROCm: this test only works with 'fork', but ROCm uses 'spawn'."
"Skipped on ROCm/XPU: this test only works with 'fork', "
"but ROCm/XPU uses 'spawn'."
)
assert not torch.cuda.is_initialized(), (