!3339 [AutoParallel]fix bug for autoparallel gpu

Merge pull request !3339 from lichen/fix_bug_for_autoparallel_gpu
This commit is contained in:
mindspore-ci-bot 2020-07-25 10:57:23 +08:00 committed by Gitee
commit 26de81a2df
1 changed files with 1 additions and 1 deletions

View File

@ -426,7 +426,7 @@ class Model:
# for data sink dataset_helper only iter once, other wise iter epoch_size times.
for inputs in dataset_helper:
if _need_to_full():
if _need_to_full() and context.get_context("device_target") == "GPU":
inputs = _to_full_tensor(inputs, self._device_number, self._global_rank)
list_callback.step_begin(run_context)
outputs = self._train_network(*inputs)