|
|
|
@@ -688,7 +688,7 @@ void ExecutorPy::RunInitGraph(const py::dict &init_params, const std::string &ph |
|
|
|
|
|
|
|
bool InitExecDataset(const std::string &queue_name, int64_t iter_num, int64_t batch_size, |
|
|
|
const std::vector<TypePtr> &types, const std::vector<std::vector<int64_t>> &shapes, |
|
|
|
const std::vector<int64_t> &input_indexes, const std::string &phase, bool use_run) { |
|
|
|
const std::vector<int64_t> &input_indexes, const std::string &phase, bool need_run) { |
|
|
|
std::string name = MsContext::GetInstance()->backend_policy(); |
|
|
|
#ifndef NO_DLIB |
|
|
|
auto ms_context = MsContext::GetInstance(); |
|
|
|
@@ -698,7 +698,7 @@ bool InitExecDataset(const std::string &queue_name, int64_t iter_num, int64_t ba |
|
|
|
} |
|
|
|
#endif |
|
|
|
if (name == kMsConvert || name == kMsVm) { |
|
|
|
return InitExecDatasetVm(queue_name, iter_num, batch_size, types, shapes, input_indexes, use_run); |
|
|
|
return InitExecDatasetVm(queue_name, iter_num, batch_size, types, shapes, input_indexes, need_run); |
|
|
|
} |
|
|
|
#if ENABLE_GE |
|
|
|
return InitExecDatasetGe(queue_name, iter_num, batch_size, types, shapes, input_indexes, phase); |
|
|
|
@@ -713,7 +713,7 @@ bool InitExecDataset(const std::string &queue_name, int64_t iter_num, int64_t ba |
|
|
|
|
|
|
|
bool InitExecDatasetVm(const std::string &queue_name, int64_t size, int64_t batch_size, |
|
|
|
const std::vector<TypePtr> &types, const std::vector<std::vector<int64_t>> &shapes, |
|
|
|
const std::vector<int64_t> &input_indexes, bool use_run) { |
|
|
|
const std::vector<int64_t> &input_indexes, bool need_run) { |
|
|
|
MS_LOG(INFO) << "Start InitDataSet Entry"; |
|
|
|
std::vector<int> int_input_indexes; |
|
|
|
(void)std::transform(input_indexes.begin(), input_indexes.end(), std::back_inserter(int_input_indexes), |
|
|
|
@@ -766,9 +766,9 @@ bool InitExecDatasetVm(const std::string &queue_name, int64_t size, int64_t batc |
|
|
|
// launch init dataset runner without inputs and outputs |
|
|
|
VectorRef args; |
|
|
|
auto fn = runner.run; |
|
|
|
if (use_run){ |
|
|
|
if (need_run) { |
|
|
|
(void)(*fn)(args); |
|
|
|
} |
|
|
|
} |
|
|
|
MS_LOG(DEBUG) << "InitDataSetVm End."; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|