Skip to content

Commit

Permalink
remove old test
Browse files Browse the repository at this point in the history
  • Loading branch information
awaelchli committed May 25, 2020
1 parent aeee807 commit fd658e6
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tests/models/test_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,24 +148,6 @@ def test_multi_gpu_none_backend(tmpdir):
tutils.run_model_test(trainer_options, model)


@pytest.mark.skipif(not torch.cuda.is_available(), reason="test requires GPU machine")
def test_auto_move_data(tmpdir):
"""Make sure auto moving data works"""

tutils.reset_seed()
tutils.set_random_master_port()

model, hparams = tutils.get_default_model()
model = model.cuda(0)
model.prepare_data()
loader = model.train_dataloader()
for x, y in loader:
x = x.view(x.size(0), -1)
assert model(x).device == torch.device('cuda:0'), "Automoving data to same device as model failed"
x = x.cuda(0)
assert model(x).device == torch.device('cuda:0'), "Automoving data to same device as model failed"


@pytest.fixture
def mocked_device_count(monkeypatch):
def device_count():
Expand Down

0 comments on commit fd658e6

Please sign in to comment.