diff options
author | Tim Dettmers <TimDettmers@users.noreply.github.com> | 2022-09-05 16:29:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 16:29:25 -0700 |
commit | aca55881b9815a462142f42f3ff0dc917830d85c (patch) | |
tree | 75477acfbce2da2a753ee21d4cf0da64f3f50ea5 /tests/test_autograd.py | |
parent | 92a3363096e10ad6a5c4e944af898bd1186d806a (diff) | |
parent | eab4d8232d558f2e6bd7f7cc3d00e2e6e94f4e80 (diff) |
Merge branch 'main' into remove_unused_code
Diffstat (limited to 'tests/test_autograd.py')
-rw-r--r-- | tests/test_autograd.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_autograd.py b/tests/test_autograd.py index 0cd17c9..bae26de 100644 --- a/tests/test_autograd.py +++ b/tests/test_autograd.py @@ -40,6 +40,7 @@ names = [ ids=names, ) def test_matmul(dim1, dim2, dim3, dim4, funcs, dtype, req_grad, transpose): + if not torch.cuda.is_available(): pytest.skip('No GPU found.') if dim2 > 0: dim2 = dim2 - (dim2 % 16) dim3 = dim3 - (dim3 % 16) @@ -306,6 +307,7 @@ def test_matmullt( has_fp16_weights, has_bias ): + if not torch.cuda.is_available(): pytest.skip('No GPU found.') dimA = (dim2, dim3) if not transpose[0] else (dim3, dim2) dimB = (dim3, dim4) if not transpose[1] else (dim4, dim3) outlier_dim = torch.randint(0, dimA[1], size=(dimA[1] // 8,), device="cuda") |