浏览代码

fix bug of nested loop expand

tags/v1.2.0-rc1
mengyuanli 4 年前
父节点
当前提交
81206de6e7
共有 1 个文件被更改,包括 7 次插入4 次删除
  1. +7
    -4
      mindspore/lite/tools/converter/legacy_optimizer/graph/nested_loop_expand_pass.cc

+ 7
- 4
mindspore/lite/tools/converter/legacy_optimizer/graph/nested_loop_expand_pass.cc 查看文件

@@ -77,14 +77,17 @@ STATUS NestedLoopExpandPass::Run(schema::MetaGraphT *graph) {
graph_->subGraph.at(idx) = nullptr;
}



for (auto &node_idx : main_graph->nodeIndices) {
auto &node = graph_->nodes.at(node_idx);
if (node->primitive->value.type == PrimitiveType_Partial) {
auto &subgraph_idx = ((schema::PartialT *)(node->primitive->value.value))->subGraphIndex;
for (auto i = 0; i < subgraph_idx; ++i) {
if (graph_->subGraph.at(subgraph_idx) == nullptr) {
if (graph_->subGraph.at(subgraph_idx) == nullptr) {
node = nullptr;
continue;
}
auto tmp_subgraph_idx = subgraph_idx;
for (auto i = 0; i < tmp_subgraph_idx; ++i) {
if (graph_->subGraph.at(i) == nullptr) {
subgraph_idx--;
}
}


正在加载...
取消
保存