diff --git a/cmake/BuildMyOnnxruntime.cmake b/cmake/BuildMyOnnxruntime.cmake index b47f5a7d..4228374a 100644 --- a/cmake/BuildMyOnnxruntime.cmake +++ b/cmake/BuildMyOnnxruntime.cmake @@ -91,6 +91,7 @@ ExternalProject_Add( GIT_REPOSITORY https://github.com/microsoft/onnxruntime.git GIT_TAG v1.14.1 GIT_SHALLOW ON + PATCH_COMMAND git apply ${CMAKE_SOURCE_DIR}/cmake/onnxruntime-v1.14.1.patch || true CONFIGURE_COMMAND "${Onnxruntime_PLATFORM_CONFIGURE}" BUILD_COMMAND ${PYTHON3} /tools/ci_build/build.py --build_dir --config diff --git a/cmake/onnxruntime-v1.14.1.patch b/cmake/onnxruntime-v1.14.1.patch new file mode 100644 index 00000000..f5a33c69 --- /dev/null +++ b/cmake/onnxruntime-v1.14.1.patch @@ -0,0 +1,12 @@ +diff --git a/onnxruntime/core/mlas/lib/intrinsics/avx512/quantize_avx512f.cpp b/onnxruntime/core/mlas/lib/intrinsics/avx512/quantize_avx512f.cpp +index 47d2dce45c..162353a8ef 100644 +--- a/onnxruntime/core/mlas/lib/intrinsics/avx512/quantize_avx512f.cpp ++++ b/onnxruntime/core/mlas/lib/intrinsics/avx512/quantize_avx512f.cpp +@@ -1,3 +1,7 @@ ++#if !defined(__clang__) && defined(__GNUC__) ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" ++#endif + /*++ + + Copyright (c) Microsoft Corporation. All rights reserved.