Skip to content

Commit c36e503

Browse files
committed
Fixing CI errors
1 parent ebbb7a4 commit c36e503

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎Tutorials/ML/benchmarkOnnxModel.cxx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@
1717
#include <Framework/runDataProcessing.h>
1818

1919
#include <ML/3rdparty/GPUORTFloat16.h>
20+
#include <onnxruntime_c_api.h>
2021
#include <onnxruntime_cxx_api.h>
2122

2223
#include <algorithm>
2324
#include <chrono>
25+
#include <cstddef>
2426
#include <cstdint>
2527
#include <fstream>
2628
#include <iomanip>
29+
#include <ios>
2730
#include <limits>
2831
#include <memory>
2932
#include <stdexcept>
@@ -206,10 +209,12 @@ struct BenchmarkOnnxModel {
206209
auto inputName = session.GetInputNameAllocated(0, allocator);
207210
const char* inputNames[] = {inputName.get()};
208211
std::vector<std::string> names;
212+
names.reserve(session.GetOutputCount());
209213
for (size_t i = 0; i < session.GetOutputCount(); ++i) {
210214
names.emplace_back(session.GetOutputNameAllocated(i, allocator).get());
211215
}
212216
std::vector<const char*> outputNames;
217+
outputNames.reserve(names.size());
213218
for (auto const& name : names) {
214219
outputNames.push_back(name.c_str());
215220
}

0 commit comments

Comments
 (0)