mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
remove dead code in openvino EP (#18457)
### Description <!-- Describe your changes. --> Remove dead code in openvino EP ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Remove dead code in openvino EP
This commit is contained in:
parent
dd355e39a0
commit
b9fd9c5665
3 changed files with 2 additions and 14 deletions
|
|
@ -146,26 +146,15 @@ std::vector<std::unique_ptr<ComputeCapability>> GetCapability::Execute() {
|
|||
// If subgraph has less then three, graph is considered trivial
|
||||
if (this_cluster.size() < 3) {
|
||||
continue;
|
||||
} else {
|
||||
// If subgraph only has Identity node, EyeLike or Dropout, OpenVINO EP doesn't support it.
|
||||
if (this_cluster.size() == 1) {
|
||||
const auto& node = graph_viewer_.GetNode(this_cluster[0]);
|
||||
if (IsOpSupportedOnlyInModel(node->OpType()))
|
||||
continue;
|
||||
// If reshape is not an intermediate node, shape needs to be an initializer
|
||||
if (data_ops_->SpecialConditionForClusterSizeOne(ng_required_initializers, node))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> cluster_graph_inputs, cluster_inputs, const_inputs, cluster_outputs;
|
||||
std::vector<std::string> cluster_graph_inputs, cluster_inputs, cluster_outputs;
|
||||
|
||||
GetInputsOutputsOfCluster(graph_viewer_,
|
||||
this_cluster,
|
||||
ng_required_initializers,
|
||||
cluster_graph_inputs,
|
||||
cluster_inputs,
|
||||
const_inputs,
|
||||
cluster_outputs);
|
||||
|
||||
bool omit_subgraph = false;
|
||||
|
|
|
|||
|
|
@ -180,12 +180,12 @@ void GetInputsOutputsOfCluster(const GraphViewer& graph_viewer,
|
|||
const std::unordered_set<std::string>& ng_required_initializers,
|
||||
/*out*/ std::vector<std::string>& cluster_graph_inputs,
|
||||
/*out*/ std::vector<std::string>& cluster_inputs,
|
||||
/*out*/ std::vector<std::string>& constant_inputs,
|
||||
/*out*/ std::vector<std::string>& cluster_outputs) {
|
||||
std::unordered_set<std::string> input_args;
|
||||
std::vector<std::string> ordered_input_args;
|
||||
std::unordered_set<std::string> output_args;
|
||||
std::unordered_set<std::string> external_output_args;
|
||||
std::vector<std::string> constant_inputs;
|
||||
|
||||
for (const auto& node_idx : cluster) {
|
||||
const auto& node = graph_viewer.GetNode(node_idx);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ void GetInputsOutputsOfCluster(const GraphViewer& graph_viewer,
|
|||
const std::unordered_set<std::string>& ng_required_initializers,
|
||||
/*out*/ std::vector<std::string>& cluster_graph_inputs,
|
||||
/*out*/ std::vector<std::string>& cluster_inputs,
|
||||
/*out*/ std::vector<std::string>& constant_inputs,
|
||||
/*out*/ std::vector<std::string>& cluster_outputs);
|
||||
|
||||
} // namespace openvino_ep
|
||||
|
|
|
|||
Loading…
Reference in a new issue