Skip to content

Commit

Permalink
Skip cpp tests if CUDA not available.
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Z. Yang <[email protected]>
  • Loading branch information
ezyang committed Nov 2, 2017
1 parent 53b0152 commit 9ca8b32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ def doit(x, y):
assert(torch.equal(torch.ones([2, 2]), t_node.t("a")))
self.assertExpected(str(g2))

@unittest.skipIf(not torch.cuda.is_available(), "cpp tests require CUDA")
def test_cpp(self):
torch._C._jit_run_cpp_tests()

Expand Down

0 comments on commit 9ca8b32

Please sign in to comment.