Browse Source

!10430 ascend support ps cache sink_size as 1

From: @limingqi107
Reviewed-by: @chujinjin,@kisnwang
Signed-off-by: @kisnwang
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
162e33baf0
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/train/dataset_helper.py

+ 2
- 1
mindspore/train/dataset_helper.py View File

@@ -99,7 +99,8 @@ def connect_network_with_dataset(network, dataset_helper):
if (hasattr(dataset_iter, "sink_size") and dataset_iter.sink_size == 1) \ if (hasattr(dataset_iter, "sink_size") and dataset_iter.sink_size == 1) \
and (hasattr(dataset_iter, "sink_count") and dataset_iter.sink_count == 1) \ and (hasattr(dataset_iter, "sink_count") and dataset_iter.sink_count == 1) \
and context.get_context("device_target") == "Ascend" \ and context.get_context("device_target") == "Ascend" \
and context.get_context("mode") == context.GRAPH_MODE:
and context.get_context("mode") == context.GRAPH_MODE \
and ms_role != "MS_WORKER":


if not hasattr(dataset, '__network__'): if not hasattr(dataset, '__network__'):
dataset.__network__ = network dataset.__network__ = network


Loading…
Cancel
Save