Skip to content

Commit 776bedf

Browse files
authored
Revert "Cluster Change to avoid Dangling DQLinear (#739)" (#743)
This reverts commit 89ccd81.
1 parent 05126ff commit 776bedf

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

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

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -168,33 +168,17 @@ std::vector<std::unique_ptr<ComputeCapability>> GetCapability::Execute() {
168168
auto connected_clusters = GetConnectedClusters(graph_viewer_, ng_clusters);
169169

170170
int no_of_clusters = 0;
171-
std::vector<NodeIndex> prev_cluster;
172-
bool try_next_cluster = false;
173171

174172
for (auto this_cluster : connected_clusters) {
175-
bool omit_subgraph = false;
176-
if (try_next_cluster) {
177-
// no need to check previous cluster
178-
for (auto idx : prev_cluster) {
179-
if ((std::find(this_cluster.begin(), this_cluster.end(), idx)) == this_cluster.end()) {
180-
this_cluster.emplace_back(idx);
181-
}
182-
}
183-
try_next_cluster = false;
184-
}
185-
186173
// If subgraph has less then three, graph is considered trivial unless its an epctx cluster
187-
if (!try_next_cluster && this_cluster.size() < 3) {
174+
if (this_cluster.size() < 3) {
188175
bool is_epctx_node = false;
189176
for (auto node_idx : this_cluster) {
190177
if (graph_viewer_.GetNode(node_idx)->OpType() == "EPContext")
191178
is_epctx_node = true;
192179
}
193-
if (!is_epctx_node) {
194-
omit_subgraph = true;
195-
prev_cluster = this_cluster;
196-
try_next_cluster = true;
197-
}
180+
if (!is_epctx_node)
181+
continue;
198182
}
199183

200184
std::vector<std::string> cluster_graph_inputs, cluster_inputs, cluster_outputs;
@@ -206,7 +190,7 @@ std::vector<std::unique_ptr<ComputeCapability>> GetCapability::Execute() {
206190
cluster_inputs,
207191
cluster_outputs);
208192

209-
193+
bool omit_subgraph = false;
210194
// Omitting zero dim subgraphs
211195
for (auto index : this_cluster) {
212196
const Node* node = graph_viewer_.GetNode(index);

0 commit comments

Comments
 (0)