onnxruntime: 1.26.0 -> 1.27.1

Changelog: https://github.com/microsoft/onnxruntime/releases/tag/v1.27.1
This commit is contained in:
Attila Oláh
2026-07-14 19:45:55 +02:00
parent ac0238b1a3
commit 513cb1ebd7
3 changed files with 2 additions and 70 deletions

View File

@@ -1,33 +0,0 @@
From 7bc56c886c8b9fa27842a14bbb964ffe8e576a9e Mon Sep 17 00:00:00 2001
From: Jaeyoon Jung <jaeyoon.jung@lge.com>
Date: Tue, 12 Aug 2025 10:55:52 +0900
Subject: [PATCH] Fix build with musl
Added __GLIBC__ macro for 'execinfo.h' and related functions as they are
GLIBC specific and not available in other libc implementation like musl.
---
onnxruntime/core/platform/posix/stacktrace.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/onnxruntime/core/platform/posix/stacktrace.cc b/onnxruntime/core/platform/posix/stacktrace.cc
index a34f6fd82ddd1..ab00f5fbb233e 100644
--- a/onnxruntime/core/platform/posix/stacktrace.cc
+++ b/onnxruntime/core/platform/posix/stacktrace.cc
@@ -3,7 +3,7 @@
#include "core/common/common.h"
-#if !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_) && !defined(_AIX)
+#if !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_) && !defined(_AIX) && defined(__GLIBC__)
#include <execinfo.h>
#endif
#include <vector>
@@ -13,7 +13,7 @@ namespace onnxruntime {
std::vector<std::string> GetStackTrace() {
std::vector<std::string> stack;
-#if !defined(NDEBUG) && !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_)
+#if !defined(NDEBUG) && !defined(__ANDROID__) && !defined(__wasm__) && !defined(_OPSCHEMA_LIB_) && defined(__GLIBC__)
constexpr int kCallstackLimit = 64; // Maximum depth of callstack
void* array[kCallstackLimit];

View File

@@ -1,26 +0,0 @@
diff --git a/cmake/onnxruntime_providers_cuda.cmake b/cmake/onnxruntime_providers_cuda.cmake
index 624057dd43..64de9a0860 100644
--- a/cmake/onnxruntime_providers_cuda.cmake
+++ b/cmake/onnxruntime_providers_cuda.cmake
@@ -310,7 +310,7 @@
message( WARNING "To compile with NHWC ops enabled please compile against cuDNN 9 or newer." )
endif()
endif()
- target_link_libraries(${target} PRIVATE CUDA::cublasLt CUDA::cublas CUDNN::cudnn_all cudnn_frontend CUDA::curand CUDA::cufft CUDA::cudart
+ target_link_libraries(${target} PRIVATE CUDA::cublasLt CUDA::cublas CUDNN::cudnn_all cudnn_frontend CUDA::curand CUDA::cufft CUDA::cudart CUDA::nvrtc CUDA::cuda_driver
${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED} Boost::mp11 safeint_interface)
endif()
diff --git a/cmake/onnxruntime_providers_cuda_plugin.cmake b/cmake/onnxruntime_providers_cuda_plugin.cmake
index e345c944dc..82742df359 100644
--- a/cmake/onnxruntime_providers_cuda_plugin.cmake
+++ b/cmake/onnxruntime_providers_cuda_plugin.cmake
@@ -250,6 +250,8 @@ target_link_libraries(onnxruntime_providers_cuda_plugin PRIVATE
CUDA::cublas
CUDA::cublasLt
CUDA::cufft
+ CUDA::nvrtc
+ CUDA::cuda_driver
CUDNN::cudnn_all
cudnn_frontend
Boost::mp11

View File

@@ -112,20 +112,17 @@ let
in
effectiveStdenv.mkDerivation (finalAttrs: {
pname = "onnxruntime";
version = "1.26.0";
version = "1.27.1";
src = fetchFromGitHub {
owner = "microsoft";
repo = "onnxruntime";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-+9M4mEPLLJ5N+JomoXIKcUBV85lr6lFJjJQ3qsMRrQY=";
hash = "sha256-i2u/JnfbJ/srsZY3ATb2YsBBXEhTGhatsr3+9eHVV3M=";
};
patches = [
# Skip execinfo include on musl
# https://github.com/microsoft/onnxruntime/pull/25726
./musl-execinfo.patch
# Add missing include which is only needed on musl (is implied in other includes on glibc)
# https://github.com/microsoft/onnxruntime/pull/26969
./musl-cstdint.patch
@@ -134,12 +131,6 @@ effectiveStdenv.mkDerivation (finalAttrs: {
# https://github.com/microsoft/onnxruntime/issues/9155
# Patch adapted from https://gitlab.alpinelinux.org/alpine/aports/-/raw/462dfe0eb4b66948fe48de44545cc22bb64fdf9f/community/onnxruntime/0001-Remove-MATH_NO_EXCEPT-macro.patch
./remove-MATH_NO_EXCEPT-macro.patch
]
# Include additional target_link_libraries needed for cudnn-frontend >= 2.19
# See: https://github.com/microsoft/onnxruntime/pull/28849
# These changes are included in 548ab6e and fc7a9f0 upstream
++ lib.optionals cudaSupport [
./nvrtc-link.patch
];
postPatch = ''