Home
last modified time | relevance | path

Searched refs:dataset_strategy (Results 1 – 11 of 11) sorted by relevance

/third_party/mindspore/mindspore/parallel/
D_utils.py78 dataset_strategy = context.get_auto_parallel_context("dataset_strategy")
79 if dataset_strategy and dataset_strategy not in ("data_parallel", "full_batch"):
87 dataset_strategy = ()
89 dataset_strategy = context.get_auto_parallel_context("dataset_strategy")
90 if dataset_strategy:
91 if len(shapes) != len(dataset_strategy):
93 "dataset strategy size {}".format(len(shapes), len(dataset_strategy)))
95 if len(shape) != len(dataset_strategy[index]):
97 … "dataset strategy item size {}".format(len(shape), len(dataset_strategy[index])))
100 new_shape += (item * dataset_strategy[index][i],)
[all …]
D_auto_parallel_context.py266 def set_dataset_strategy(self, dataset_strategy): argument
274 if isinstance(dataset_strategy, str):
275 if dataset_strategy not in ("full_batch", "data_parallel"):
278 self._context_handle.set_full_batch(dataset_strategy == "full_batch")
281 if not isinstance(dataset_strategy, tuple):
283 for ele in dataset_strategy:
290 self._context_handle.set_dataset_strategy(dataset_strategy)
/third_party/mindspore/tests/ut/python/parallel/
Dtest_virtual_output.py136 dataset_strategy="data_parallel")
147 dataset_strategy="full_batch")
158 dataset_strategy="data_parallel")
169 dataset_strategy="full_batch")
180 dataset_strategy="data_parallel")
194 dataset_strategy="full_batch")
208 dataset_strategy="data_parallel")
222 dataset_strategy="full_batch")
236 dataset_strategy="data_parallel")
249 dataset_strategy="data_parallel")
[all …]
Dtest_virtual_dataset_with_strategy.py88 context.set_auto_parallel_context(dataset_strategy=strategy0)
102 context.set_auto_parallel_context(dataset_strategy=strategy0)
116 context.set_auto_parallel_context(dataset_strategy=strategy0)
130 context.set_auto_parallel_context(dataset_strategy=strategy0)
144 context.set_auto_parallel_context(dataset_strategy=strategy0)
158 context.set_auto_parallel_context(dataset_strategy=strategy0)
Dtest_full_batch.py75 dataset_strategy="full_batch")
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/
Dcontext.h68 void set_dataset_strategy(const std::vector<std::vector<int64_t>> &dataset_strategy);
69 std::vector<std::vector<int64_t>> dataset_strategy() const { return dataset_strategy_; } in dataset_strategy() function
Dcontext.cc94 … ParallelContext::set_dataset_strategy(const std::vector<std::vector<int64_t>> &dataset_strategy) { in set_dataset_strategy() argument
95 dataset_strategy_ = dataset_strategy; in set_dataset_strategy()
Dstep_parallel.cc1743 …if (!ParallelContext::GetInstance()->dataset_strategy().empty() && prim->name() == VIRTUAL_DATA_SE… in SetVirtualDatasetStrategy()
1745 auto dataset_strategy = ParallelContext::GetInstance()->dataset_strategy(); in SetVirtualDatasetStrategy() local
1746 …(void)std::transform(dataset_strategy.begin(), dataset_strategy.end(), std::back_inserter(elements… in SetVirtualDatasetStrategy()
3047 if (!root->has_flag(TRAINING) && !ParallelContext::GetInstance()->dataset_strategy().empty()) { in IsInsertVirtualOutput()
3052 return (!root->has_flag(TRAINING) && ParallelContext::GetInstance()->dataset_strategy().empty() && in IsInsertVirtualOutput()
/third_party/mindspore/mindspore/ccsrc/frontend/parallel/ops_info/
Dvirtual_dataset_info.cc157 if (!ParallelContext::GetInstance()->dataset_strategy().empty()) { in GenerateStrategies()
158 strategy = ParallelContext::GetInstance()->dataset_strategy(); in GenerateStrategies()
Dget_next_info.cc122 if (!ParallelContext::GetInstance()->dataset_strategy().empty()) { in CheckStrategy()
123 dataset_strategy_ = ParallelContext::GetInstance()->dataset_strategy(); in CheckStrategy()
/third_party/mindspore/mindspore/ccsrc/pipeline/jit/
Dinit.cc184 … .def("get_dataset_strategy", &ParallelContext::dataset_strategy, "Get dataset sharding strategy.") in PYBIND11_MODULE()