Skip to content

Commit

Permalink
make tests pass mps (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbloomAus authored Mar 26, 2024
1 parent 6673d88 commit 93c2246
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/acceptance/test_hooked_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,12 @@ def check_dtype(dtype, margin, no_processing=False):
gc.collect()


@pytest.mark.skipif(
torch.backends.mps.is_available() or not torch.cuda.is_available(),
reason="some operations unsupported by MPS: https://github.com/pytorch/pytorch/issues/77754 or no GPU",
)
@pytest.mark.parametrize("dtype", [torch.float64, torch.float32])
def test_dtypes(dtype):
def test_dtype_float(dtype):
check_dtype(dtype, margin=5e-4)


Expand Down

0 comments on commit 93c2246

Please sign in to comment.