mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-07 00:13:17 +00:00
parent
1240c595a9
commit
f41396eff0
1 changed files with 13 additions and 0 deletions
|
|
@ -688,6 +688,19 @@ void SessionState::ResolveMemoryPatternFlag() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// For subgraphs, the implicit inputs need to meet the same crieria
|
||||
// as the explicit inputs for memory pattern to be enabled
|
||||
if (graph_viewer_->IsSubgraph()) {
|
||||
const auto* parent_node = graph_viewer_->ParentNode();
|
||||
|
||||
for (auto* implicit_input : parent_node->ImplicitInputDefs()) {
|
||||
if (!implicit_input->HasTensorOrScalarShape()) {
|
||||
enable_mem_pattern_ = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue