Skip to content

Commit

Permalink
Update test_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
makgyver committed Oct 5, 2024
1 parent e7559f4 commit 04a5922
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,9 @@ def test_plot_dist(mock_show):

def test_check_mem():
net = MNIST_2NN()
assert check_model_fit_mem(net, (28 * 28,), 100, "mps", True)

if torch.backends.mps.is_available():
assert check_model_fit_mem(net, (28 * 28,), 100, "mps", True)

if torch.cuda.is_available():
assert check_model_fit_mem(net, (28 * 28,), 100, "cuda")
Expand Down

0 comments on commit 04a5922

Please sign in to comment.