|
|
|
@@ -194,7 +194,7 @@ class UtestLogicalStreamAllocator : public testing::Test { |
|
|
|
SchedulerConf scheduler_conf; |
|
|
|
if (confs.empty()) { |
|
|
|
for (const auto &subgraph_pair : subgraph_map) { |
|
|
|
for (const auto &sub_graph : subgraph_pair.second) { |
|
|
|
for (const auto &sub_graph : subgraph_pair.second) { |
|
|
|
EngineConfPtr conf = make_shared<EngineConf>(); |
|
|
|
conf->id = sub_graph->GetEngineName(); |
|
|
|
if (conf->id == "ge_local") { |
|
|
|
@@ -202,7 +202,7 @@ class UtestLogicalStreamAllocator : public testing::Test { |
|
|
|
conf->attach = true; |
|
|
|
} |
|
|
|
scheduler_conf.cal_engines[conf->id] = conf; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
for (auto &conf : confs) { |
|
|
|
@@ -223,17 +223,17 @@ class UtestLogicalStreamAllocator : public testing::Test { |
|
|
|
} |
|
|
|
|
|
|
|
Status AssignLogicalStreams(vector<SubGraphInfoPtr> subgraphs, |
|
|
|
vector<EngineConfPtr> &confs, |
|
|
|
std::map<std::string, int> &max_parallel_num, |
|
|
|
ComputeGraphPtr &whole_graph) { |
|
|
|
vector<EngineConfPtr> &confs, |
|
|
|
std::map<std::string, int> &max_parallel_num, |
|
|
|
ComputeGraphPtr &whole_graph) { |
|
|
|
Graph2SubGraphInfoList subgraph_map; |
|
|
|
subgraph_map[whole_graph] = subgraphs; |
|
|
|
return AssignLogicalStreams(subgraph_map, confs, max_parallel_num, whole_graph); |
|
|
|
} |
|
|
|
|
|
|
|
Status AssignLogicalStreams(vector<SubGraphInfoPtr> subgraphs, |
|
|
|
vector<EngineConfPtr>& confs, |
|
|
|
std::map<std::string, int> &max_parallel_num) { |
|
|
|
vector<EngineConfPtr>& confs, |
|
|
|
std::map<std::string, int> &max_parallel_num) { |
|
|
|
ComputeGraphPtr whole_graph = make_shared<ComputeGraph>("whole_graph"); |
|
|
|
return AssignLogicalStreams(subgraphs, confs, max_parallel_num, whole_graph); |
|
|
|
} |
|
|
|
|