Skip to content

Commit 4fd5fab

Browse files
divyanshkpytorchmergebot
authored andcommitted
skip XPU for dataloader CPU only unit test (pytorch#159811)
Fixes [pytorch#159802](pytorch#159802) Pull Request resolved: pytorch#159811 Approved by: https://github.com/izaitsevfb
1 parent bbc0df1 commit 4fd5fab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_dataloader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3133,6 +3133,8 @@ def test_pin_memory(self):
31333133
self.assertTrue(sample["a_tensor"].is_pinned())
31343134
self.assertTrue(sample["another_dict"]["a_number"].is_pinned())
31353135

3136+
@skipIfXpu
3137+
@skipIfRocm
31363138
@unittest.skipIf(TEST_CUDA, "Test for when CUDA is not available")
31373139
def test_pin_memory_no_cuda(self):
31383140
loader = DataLoader(self.dataset, batch_size=2, pin_memory=True)

0 commit comments

Comments
 (0)