Skip to content

Commit f3f40a0

Browse files
committed
update onnxruntime version to 1.141.1
1 parent 814e39b commit f3f40a0

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
test-production:
2525
runs-on: ubuntu-20.04
2626
container:
27-
image: xmba15/onnx_runtime_cpp:v1.10.0-ubuntu20.04
27+
image: xmba15/onnx_runtime_cpp:v1.14.1-ubuntu20.04
2828

2929
steps:
3030
- uses: actions/checkout@v3

scripts/install_latest_cmake.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
readonly CMAKE_VERSION_TO_INSTALL="3.18.0"
3+
readonly CMAKE_VERSION_TO_INSTALL="3.24.0"
44

55
function command_exists
66
{

scripts/install_onnx_runtime.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sudo -l
99
sudo apt-get update
1010
sudo apt install -y --no-install-recommends zlib1g-dev
1111

12-
readonly ONNXRUNTIME_VERSION="v1.10.0"
12+
readonly ONNXRUNTIME_VERSION="v1.14.1"
1313
git clone --recursive -b ${ONNXRUNTIME_VERSION} https://github.com/Microsoft/onnxruntime
1414
cd onnxruntime
1515

src/OrtSessionHandler.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
*/
77

8+
#include <onnxruntime/core/session/onnxruntime_c_api.h>
89
#include <onnxruntime/core/session/onnxruntime_cxx_api.h>
910

1011
#if ENABLE_TENSORRT
@@ -254,9 +255,13 @@ void OrtSessionHandler::OrtSessionHandlerIml::initModelInfo()
254255
m_inputTensorSizes.emplace_back(
255256
std::accumulate(std::begin(curInputShape), std::end(curInputShape), 1, std::multiplies<int64_t>()));
256257

258+
#if ORT_API_VERSION > 12
259+
m_inputNodeNames.emplace_back(strdup(m_session.GetInputNameAllocated(i, m_ortAllocator).get()));
260+
#else
257261
char* inputName = m_session.GetInputName(i, m_ortAllocator);
258262
m_inputNodeNames.emplace_back(strdup(inputName));
259263
m_ortAllocator.Free(inputName);
264+
#endif
260265
}
261266

262267
{
@@ -276,9 +281,13 @@ void OrtSessionHandler::OrtSessionHandlerIml::initModelInfo()
276281

277282
m_outputShapes.emplace_back(tensorInfo.GetShape());
278283

284+
#if ORT_API_VERSION > 12
285+
m_outputNodeNames.emplace_back(strdup(m_session.GetOutputNameAllocated(i, m_ortAllocator).get()));
286+
#else
279287
char* outputName = m_session.GetOutputName(i, m_ortAllocator);
280288
m_outputNodeNames.emplace_back(strdup(outputName));
281289
m_ortAllocator.Free(outputName);
290+
#endif
282291
}
283292

284293
{

0 commit comments

Comments
 (0)