Skip to content

Commit c489087

Browse files
committed
Fix to omit subgraph
1 parent 384061f commit c489087

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

onnxruntime/core/providers/openvino/ov_versions/capability.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,19 +171,17 @@ std::vector<std::unique_ptr<ComputeCapability>> GetCapability::Execute() {
171171
bool omit_subgraph = false;
172172

173173
auto id = this_cluster.at(0);
174-
std::cout << graph_viewer_.GetNode(id)->Name() << "\n";
175-
176174
if (this_cluster.size() == 1) {
177175
//check next cluster
178176
auto index = this_cluster.at(0);
179-
if (graph_viewer_.GetNode(index)->OpType() != "EPContext") {
177+
if (graph_viewer_.GetNode(index)->OpType() == "EPContext") {
178+
omit_subgraph=false;
179+
} else if(cluster_index < this_cluster.size()-1) {
180180
bool append_node = AddTrivialClusterToNextClusterIfConnected(graph_viewer_, index, connected_clusters[cluster_index+1]);
181181
if(append_node) {
182182
connected_clusters[cluster_index+1].emplace_back(index);
183183
}
184184
omit_subgraph=true;
185-
} else if (graph_viewer_.GetNode(index)->OpType() == "EPContext") {
186-
omit_subgraph=false;
187185
}
188186
}
189187

0 commit comments

Comments
 (0)