File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
onnxruntime/core/providers/openvino Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -138,20 +138,16 @@ void PatchStatefulDecoder(std::shared_ptr<ov::Model> model) {
138138 std::vector<std::string> key_value_input_names;
139139 std::vector<std::string> not_kv_inputs;
140140 const auto & params = model->get_parameters ();
141- bool found = false ;
141+
142142 for (size_t i = 0 ; i < params.size (); i++) {
143- auto param_name = params. at (i) ->output (0 ).get_any_name ();
143+ auto param_name = params[i] ->output (0 ).get_any_name ();
144144 if (param_name.find (" key_values" ) != std::string::npos) {
145- key_value_input_names.push_back (param_name);
146- found = true ;
145+ key_value_input_names.push_back (param_name);
147146 } else if (param_name.find (" keys" ) != std::string::npos) {
148- key_value_input_names.push_back (param_name);
149- found = true ;
147+ key_value_input_names.push_back (param_name);
150148 } else if (param_name.find (" values" ) != std::string::npos) {
151- key_value_input_names.push_back (param_name);
152- found = true ;
153- }
154- if (!found) {
149+ key_value_input_names.push_back (param_name);
150+ } else {
155151 not_kv_inputs.push_back (param_name);
156152 }
157153 }
You can’t perform that action at this time.
0 commit comments