Skip to content

Commit 1628d38

Browse files
committed
Upgrade to onnx 1.7.1 (forked version with custom allocator)
1 parent f9e45ff commit 1628d38

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

get_deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fi
282282

283283
################################################################################### ONNXRUNTIME
284284

285-
ORT_VERSION="1.6.0"
285+
ORT_VERSION="1.7.1"
286286

287287
if [[ $WITH_ORT != 0 ]]; then
288288
[[ $FORCE == 1 ]] && rm -rf $ONNXRUNTIME

opt/build/onnxruntime/Dockerfile.x64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG OS=debian:buster
66
FROM ${OS}
77

88
ARG ONNXRUNTIME_REPO=https://github.com/RedisAI/onnxruntime
9-
ARG ONNXRUNTIME_VER=1.6.0
9+
ARG ONNXRUNTIME_VER=1.7.1
1010
ARG ARCH=x64
1111

1212
RUN apt-get -qq update

opt/build/onnxruntime/Dockerfile.x64-gpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG CUDA_VER=11.0-cudnn8
44
FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04
55

66
ARG ONNXRUNTIME_REPO=https://github.com/RedisAI/onnxruntime
7-
ARG ONNXRUNTIME_VER=1.6.0
7+
ARG ONNXRUNTIME_VER=1.7.1
88
ARG ARCH=x64-gpu
99

1010
RUN apt-get -qq update

opt/build/onnxruntime/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
ROOT=.
33

4-
VERSION ?= 1.6.0
4+
VERSION ?= 1.7.1
55
OSNICK ?= buster
66

77
#----------------------------------------------------------------------------------------------

opt/build/onnxruntime/pack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PLATFORM="$2"
66

77
mkdir -p pack/include pack/lib
88
cp onnxruntime/build/Linux/MinSizeRel/libonnxruntime.so.${VER} pack/lib/
9-
cp onnxruntime/docs/C_API.md pack/
9+
cp onnxruntime/docs/C_API_Guidelines.md pack/
1010
cp onnxruntime/LICENSE pack/
1111
cp onnxruntime/README.md pack/
1212
cp onnxruntime/ThirdPartyNotices.txt pack/

src/backends/onnxruntime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ RAI_Model *RAI_ModelCreateORT(RAI_Backend backend, const char *devicestr, RAI_Mo
329329
}
330330

331331
// TODO: these options could be configured at the AI.CONFIG level
332-
ONNX_VALIDATE_STATUS(ort->SetSessionGraphOptimizationLevel(session_options, ORT_DISABLE_ALL))
332+
ONNX_VALIDATE_STATUS(ort->SetSessionGraphOptimizationLevel(session_options, ORT_ENABLE_BASIC))
333333
ONNX_VALIDATE_STATUS(
334334
ort->SetIntraOpNumThreads(session_options, (int)opts.backends_intra_op_parallelism))
335335
ONNX_VALIDATE_STATUS(

tests/flow/tests_onnx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def test_onnx_use_custom_allocator(env):
504504
ai_memory_config = {k.split(":")[0]: k.split(":")[1]
505505
for k in con.execute_command("INFO MODULES").decode().split("#")[4].split()[1:]}
506506
allocator_access_num_after = ai_memory_config["ai_onnxruntime_memory_access_num"]
507-
env.assertEqual(int(allocator_access_num_after) - int(allocator_access_num_before), 22)
507+
env.assertEqual(int(allocator_access_num_after) - int(allocator_access_num_before), 16)
508508

509509
values = con.execute_command('AI.TENSORGET', 'b{1}', 'VALUES')
510510
argmax = max(range(len(values)), key=lambda i: values[i])

0 commit comments

Comments
 (0)