Skip to content

Commit

Permalink
is_xla_tensor=True in data parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
lezwon committed Aug 17, 2020
1 parent f833a09 commit 617276e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/distrib_data_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def transfer_distrib_spawn_state_on_fit_end(self, model, mp_queue, results):
last_path = None
if not self.testing and best_model_path is not None and len(best_model_path) > 0:
last_path = re.sub('.ckpt', '.tmp_end.ckpt', best_model_path)
atomic_save(model.state_dict(), last_path, is_xla_tensor=self.use_tpu)
atomic_save(model.state_dict(), last_path, is_xla_tensor=True)
mp_queue.put(last_path)

def save_spawn_weights(self, model):
Expand Down

0 comments on commit 617276e

Please sign in to comment.