Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions onnxruntime/core/providers/openvino/ov_versions/capability.cc
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,20 @@ std::vector<std::unique_ptr<ComputeCapability>> GetCapability::Execute() {
for (auto this_cluster : connected_clusters) {
bool omit_subgraph = false;

//auto id = this_cluster.at(0);
if (this_cluster.size() == 1) {
//check next cluster
auto index = this_cluster.at(0);
size_t j = cluster_index;
if (graph_viewer_.GetNode(index)->OpType() == "EPContext") {
omit_subgraph=false;
} else if(cluster_index < total_clusters-1) {
bool append_node = AddTrivialClusterToNextClusterIfConnected(graph_viewer_, index, connected_clusters[cluster_index+1]);
} else if(j < total_clusters-1) {
bool append_node = false;
while(j<total_clusters && !append_node) {
j=j+1;
append_node = AddTrivialClusterToNextClusterIfConnected(graph_viewer_, index, connected_clusters[j]);
}
if(append_node) {
connected_clusters[cluster_index+1].emplace_back(index);
connected_clusters[j].emplace_back(index);
}
omit_subgraph=true;
}
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/test/providers/cpu/controlflow/loop_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ TEST(Loop, SubgraphTypeOverride) {
Graph::ResolveOptions options;
options.override_types = true;
test.Run(OpTester::ExpectResult::kExpectSuccess, "",
{kTensorrtExecutionProvider}, &session_run_options, nullptr,
{kTensorrtExecutionProvider, kOpenVINOExecutionProvider}, &session_run_options, nullptr,
ExecutionMode::ORT_SEQUENTIAL, options);
}

Expand Down
Loading