Skip to content

Commit 5ba61d7

Browse files
zejun-chenpytorchmergebot
authored andcommitted
[Fix][Profiler UT] Skip CPU for the UT test/profiler/test_execution_trace.py::test_execution_trace_with_pt2 (pytorch#142027)
[Fix] Skip CPU device for the UT `test_execution_trace_with_pt2` skip CPU because triton is only for GPUs. This UT is designed to test profiling the triton kernels. Pull Request resolved: pytorch#142027 Approved by: https://github.com/aaronenyeshi
1 parent 3d04de6 commit 5ba61d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/profiler/test_execution_trace.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
supported_activities,
3535
)
3636
from torch.testing._internal.common_cuda import TEST_CUDA
37-
from torch.testing._internal.common_device_type import instantiate_device_type_tests
37+
from torch.testing._internal.common_device_type import (
38+
instantiate_device_type_tests,
39+
skipCPUIf,
40+
)
3841
from torch.testing._internal.common_utils import (
3942
IS_WINDOWS,
4043
run_tests,
@@ -248,6 +251,7 @@ def test_execution_trace_alone(self, device):
248251
(not has_triton()) or (not TEST_CUDA and not TEST_XPU),
249252
"need triton and device(CUDA or XPU) availability to run",
250253
)
254+
@skipCPUIf(True, "skip CPU device for testing profiling triton")
251255
def test_execution_trace_with_pt2(self, device):
252256
@torchdynamo.optimize("inductor")
253257
def fn(a, b, c):

0 commit comments

Comments
 (0)