Fixed an issue with XPU skip so the test_decompose_mem_bound_mm.py suite can be ran correctly (#153245)

Fixes #153239

Replaced custom decorator with the common one. Although the better way to skip the whole suite would be to add it to skip list in run_test.py

Pull Request resolved: https://github.com/pytorch/pytorch/pull/153245
Approved by: https://github.com/guangyey, https://github.com/EikanWang, https://github.com/jeffdaily
This commit is contained in:
iupaikov-amd 2025-05-20 15:46:21 +00:00 committed by PyTorch MergeBot
parent ef958fa152
commit 2e56ce097a

View File

@ -1,6 +1,7 @@
# Owner(s): ["module: inductor"]
import logging
import unittest
import torch
import torch._inductor
@ -12,7 +13,7 @@ from torch.testing import FileCheck
from torch.testing._internal.common_utils import (
instantiate_parametrized_tests,
parametrize,
skipIfXpu,
TEST_XPU,
)
from torch.testing._internal.inductor_utils import GPU_TYPE, HAS_CUDA
from torch.testing._internal.triton_utils import requires_gpu
@ -48,9 +49,10 @@ class MyModule3(torch.nn.Module):
@requires_gpu
@skipIfXpu(
msg="Intel GPU has not enabled decompose_mem_bound_mm PASS in "
"torch/_inductor/fx_passes/decompose_mem_bound_mm.py"
@unittest.skipIf(
TEST_XPU,
"Intel GPU has not enabled decompose_mem_bound_mm PASS in "
"torch/_inductor/fx_passes/decompose_mem_bound_mm.py",
)
@torch._inductor.config.patch(
post_grad_fusion_options={