Skip to content

Commit dfd5331

Browse files
Ilia Cherniavskiifacebook-github-bot
authored andcommitted
Skip tests on ROCm (pytorch#53339)
Summary: Pull Request resolved: pytorch#53339 Skip tests on ROCm Test Plan: CI Reviewed By: gdankel, ZolotukhinM Differential Revision: D26838813 fbshipit-source-id: e26286a61a192710e393c19d3eb2316b6c76a42e
1 parent 8bac382 commit dfd5331

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_profiler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import torch.utils.data
1111
from torch.testing._internal.common_cuda import TEST_MULTIGPU
1212
from torch.testing._internal.common_utils import (
13-
TestCase, run_tests, TEST_WITH_ASAN, IS_WINDOWS, TemporaryFileName, TemporaryDirectoryName)
13+
TestCase, run_tests, TEST_WITH_ASAN, TEST_WITH_ROCM, IS_WINDOWS,
14+
TemporaryFileName, TemporaryDirectoryName)
1415
from torch.autograd.profiler import profile as _profile
1516
from torch.profiler import (
1617
kineto_available, profile, record_function, DeviceType, ProfilerActivity
@@ -118,7 +119,7 @@ def payload(self, use_cuda=False):
118119

119120
@unittest.skipIf(not kineto_available(), "Kineto is required")
120121
def test_kineto(self):
121-
use_cuda = torch.cuda.is_available()
122+
use_cuda = torch.cuda.is_available() and (not TEST_WITH_ROCM)
122123
with _profile(use_cuda=use_cuda, use_kineto=True):
123124
self.payload(use_cuda=use_cuda)
124125

@@ -147,6 +148,7 @@ def test_kineto(self):
147148

148149
@unittest.skipIf(not kineto_available(), "Kineto is required")
149150
@unittest.skipIf(not TEST_MULTIGPU, "Multiple GPUs needed")
151+
@unittest.skipIf(TEST_WITH_ROCM, "Not supported on ROCm")
150152
def test_kineto_multigpu(self):
151153
with profile(
152154
activities=[

0 commit comments

Comments
 (0)