From 4e99bf17751caaf1d1765cf2c59c0f76b29dc2f5 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Wed, 6 Mar 2024 18:42:54 +0100 Subject: [PATCH] Update ONNX runtime to version 1.17.1 This version requires two more workarounds: - -Wno-error=maybe-uninitialized is needed to a void a (hopefully false positive) warning about a potentially uninitialised variable with cuDNN 8.9 and 9.0 - -Donnxruntime_NVCC_THREADS=0 is needed because the default is ON, causing nvcc to be called as "nvcc ... --threads ON ...", which causes an error. --- onnxruntime.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/onnxruntime.spec b/onnxruntime.spec index 686e131c0e0..d0ee91f8124 100644 --- a/onnxruntime.spec +++ b/onnxruntime.spec @@ -1,9 +1,9 @@ -### RPM external onnxruntime 1.14.1 +### RPM external onnxruntime 1.17.1 ## INITENV +PATH PYTHON3PATH %{i}/${PYTHON3_LIB_SITE_PACKAGES} ## INCLUDE cuda-flags %define github_user cms-externals %define branch cms/v%{realversion} -%define tag e4c6aa2984c7c71409f4c6d0db865117afa66932 +%define tag 5353412812a6f0409a15faff9a18640456ab1ff8 Source: git+https://github.com/%{github_user}/%{n}.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz BuildRequires: cmake ninja @@ -35,6 +35,7 @@ cmake ../%{n}-%{realversion}/cmake -GNinja \ -Donnxruntime_USE_CUDA=${USE_CUDA} \ -Donnxruntime_CUDA_HOME="${CUDA_ROOT}" \ -Donnxruntime_CUDNN_HOME="${CUDNN_ROOT}" \ + -Donnxruntime_NVCC_THREADS=0 \ -Donnxruntime_BUILD_CSHARP=OFF \ -Donnxruntime_USE_OPENMP=OFF \ -Donnxruntime_USE_TVM=OFF \ @@ -53,10 +54,12 @@ cmake ../%{n}-%{realversion}/cmake -GNinja \ -DCMAKE_TRY_COMPILE_PLATFORM_VARIABLES="CMAKE_CUDA_RUNTIME_LIBRARY" \ -DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${LIBPNG_ROOT};${PROTOBUF_ROOT};${PY3_PYBIND11_ROOT};${RE2_ROOT}" \ -DRE2_INCLUDE_DIR="${RE2_ROOT}/include" \ - -DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow" + -DCMAKE_CXX_FLAGS="-Wno-error=stringop-overflow -Wno-error=maybe-uninitialized" -# False positive string overflow -# https://github.com/google/flatbuffers/issues/7366 +# -Wno-error=stringop-overflow is needed to work around a false positive string overflow, +# see https://github.com/google/flatbuffers/issues/7366 + +# -Wno-error=maybe-uninitialized is needed for ONNX runtime 1.17.1 with cuDNN 8.9 or 9.0 ninja -v %{makeprocesses} python3 ../%{n}-%{realversion}/setup.py build