Skip to content

Commit

Permalink
idx
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jul 21, 2020
1 parent 6b9e296 commit 50c3b22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/models/test_tpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ def test_model_tpu_index_1(tmpdir):

@pytest.mark.skipif(not TPU_AVAILABLE, reason="test requires TPU machine")
@pl_multi_process_test
def test_model_tpu_index_8(tmpdir):
def test_model_tpu_index_7(tmpdir):
"""Make sure model trains on TPU."""
trainer_options = dict(
default_root_dir=tmpdir,
progress_bar_refresh_rate=0,
max_epochs=1,
tpu_cores=[8],
tpu_cores=[7],
limit_train_batches=0.4,
limit_val_batches=0.4
)
Expand Down Expand Up @@ -168,15 +168,15 @@ def long_train_loader():

@pytest.mark.skipif(not TPU_AVAILABLE, reason="test requires TPU machine")
@pl_multi_process_test
def test_model_16bit_tpu_index_8(tmpdir):
def test_model_16bit_tpu_index_7(tmpdir):
"""Test if distributed TPU core training works"""
model = EvalModelTemplate()
trainer = Trainer(
default_root_dir=tmpdir,
max_epochs=1,
train_percent_check=0.4,
val_percent_check=0.2,
tpu_cores=[8],
tpu_cores=[7],
)
trainer.fit(model)
assert torch_xla._XLAC._xla_get_default_device() == 'xla:8'
Expand Down

0 comments on commit 50c3b22

Please sign in to comment.