Skip to content

Commit 0f5bc73

Browse files
committed
cuda skip
1 parent 8d78390 commit 0f5bc73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_nnj.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ def test_jacobians(self, model, input_shape, device, dtype):
149149
@pytest.mark.parametrize("return_jac", [True, False])
150150
def test_jac_return(self, model, input_shape, device, return_jac):
151151
""" Test that all models returns the jacobian output if asked for it """
152+
if device == "cuda" and not torch.cuda.is_available():
153+
pytest.skip("Test requires cuda support")
154+
152155
input = torch.randn(*input_shape, device=device)
153156
model = deepcopy(model).to(device)
154157
output = model(input, jacobian=return_jac)

0 commit comments

Comments
 (0)