File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
backends/mediatek/runtime/include Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,11 @@ class NeuronExecuTorchDelegate {
189189 size_t data_input_count = mInputSizes .size ();
190190 size_t data_output_count = mOutputSizes .size ();
191191
192+ mPreparedInputs .clear ();
193+ mPreparedOutputs .clear ();
194+ mPreparedInputs .reserve (data_input_count);
195+ mPreparedOutputs .reserve (data_output_count);
196+
192197 // Prepare input data
193198 for (int i = 0 ; i < data_input_count; i++) {
194199 auto tensor_in = args[i]->toTensor ();
@@ -205,7 +210,7 @@ class NeuronExecuTorchDelegate {
205210 }
206211
207212 // Prepare output data
208- for (int o = data_output_count ; o < data_input_count + data_output_count;
213+ for (int o = data_input_count ; o < data_input_count + data_output_count;
209214 o++) {
210215 auto tensor_out = args[o]->toTensor ();
211216 auto data_ptr = tensor_out.data_ptr ();
You can’t perform that action at this time.
0 commit comments