[AOTI] skip Windows XPU crashed UTs. (#165393)

Skip some UTs, which crashed on Windows XPU.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165393
Approved by: https://github.com/jansel
This commit is contained in:
Xu Han
2025-10-14 23:45:14 +00:00
committed by PyTorch MergeBot
parent bcfea48ab7
commit e7091a47da
2 changed files with 21 additions and 0 deletions

View File

@ -2102,6 +2102,21 @@ def skipIfWindows(func=None, *, msg="test doesn't currently work on the Windows
return dec_fn(func)
return dec_fn
def skipIfWindowsXPU(func=None, *, msg="test doesn't currently work on the Windows stack"):
def dec_fn(fn):
reason = f"skipIfWindowsXPU: {msg}"
@wraps(fn)
def wrapper(*args, **kwargs):
if IS_WINDOWS and torch.xpu.is_available(): # noqa: F821
raise unittest.SkipTest(reason)
else:
return fn(*args, **kwargs)
return wrapper
if func:
return dec_fn(func)
return dec_fn
def requires_cuda_p2p_access():
cuda_p2p_access_available = (
torch.cuda.is_available()