OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[TF FE][SDL] Fix performance inefficiencies (#26644)
Roman Kazantsev4ed5ed09c0c4
diff --git a/src/frontends/tensorflow/src/decoder_proto.cpp b/src/frontends/tensorflow/src/decoder_proto.cppindex 157dca36f42..b28161faa1a 100644--- a/src/frontends/tensorflow/src/decoder_proto.cpp+++ b/src/frontends/tensorflow/src/decoder_proto.cpp@@ -150,7 +150,7 @@ void parse_producer_name(const std::string& producer_port_name,"Port id is not specified or not a number. Value: ",port_id);producer_output_port_index = std::stoi(port_id);- producer_output_port_name = port_name;+ producer_output_port_name = std::move(port_name);return;} else if (first_colon != std::string::npos) {// just one colon case@@ -186,7 +186,7 @@ std::vector<::tensorflow::AttrValue> DecoderProto::decode_attribute_helper(constauto attr_map = m_node_def->attr();if (attr_map.contains(name)) {auto value = m_node_def->attr().at(name);- return {value};+ return {std::move(value)};} else {return {};}diff --git a/src/frontends/tensorflow_common/include/helper_ops/merge.hpp b/src/frontends/tensorflow_common/include/helper_ops/merge.hppindex 045c651a871..2a04d12ba41 100644--- a/src/frontends/tensorflow_common/include/helper_ops/merge.hpp+++ b/src/frontends/tensorflow_common/include/helper_ops/merge.hpp@@ -84,7 +84,7 @@ public:cf_marker_exists(this_node),"[TensorFlow Frontend] internal error: Switch node has not set conditional flow marker");auto cf_marker = get_cf_marker(this_node);- for (auto eliminated_marker : cf_marker.merge_eliminated_markers) {+ for (const auto& eliminated_marker : cf_marker.merge_eliminated_markers) {resulted_indices.push_back(eliminated_marker.first);}return resulted_indices;