Skip to content

Commit

Permalink
skip tests that needs cuda
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
weifengpy committed Apr 27, 2024
1 parent 9e6b4ec commit 857b8db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/dtypes/test_nf4.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ def test_pin_memory(self):
nf4_tensor = to_nf4(torch.randn(512 * 512, device='cuda'))
self.assertFalse(nf4_tensor.is_pinned())

@unittest.skipIf(not torch.cuda.is_available(), "Need CUDA available")
def test_to_cuda(self):
nf4_tensor = to_nf4(torch.randn(512 * 512))
self.assertEqual(nf4_tensor.device.type, "cpu")
Expand Down

0 comments on commit 857b8db

Please sign in to comment.