mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-10 11:50:52 +00:00
onnxruntime: bump to 1.24.1 (#28367)
This commit is contained in:
@@ -6,136 +6,8 @@ This reverts f70215d4e6af2a1b5a0cc232460e2f86125b055d
|
||||
URL_HASH SHA1=${DEP_SHA1_abseil_cpp}
|
||||
EXCLUDE_FROM_ALL
|
||||
PATCH_COMMAND ${ABSL_PATCH_COMMAND}
|
||||
- FIND_PACKAGE_ARGS 20250512 NAMES absl
|
||||
- FIND_PACKAGE_ARGS 20250814 NAMES absl
|
||||
+ FIND_PACKAGE_ARGS NAMES absl
|
||||
)
|
||||
|
||||
onnxruntime_fetchcontent_makeavailable(abseil_cpp)
|
||||
@@ -57,96 +57,45 @@
|
||||
# TODO: since multiple ORT's dependencies depend on Abseil, the list below would vary from version to version.
|
||||
# We'd better to not manually manage the list.
|
||||
set(ABSEIL_LIBS
|
||||
-absl::absl_log
|
||||
-absl::log_internal_log_impl
|
||||
-absl::log_internal_strip
|
||||
-absl::log_internal_message
|
||||
-absl::log_internal_format
|
||||
-absl::synchronization
|
||||
-absl::str_format
|
||||
-absl::flags
|
||||
-absl::log_internal_globals
|
||||
-absl::kernel_timeout_internal
|
||||
-absl::str_format_internal
|
||||
-absl::hash
|
||||
-absl::log_internal_append_truncated
|
||||
-absl::absl_vlog_is_on
|
||||
-absl::flags_commandlineflag
|
||||
-absl::time
|
||||
-absl::symbolize
|
||||
-absl::graphcycles_internal
|
||||
-absl::log_internal_conditions
|
||||
-absl::strings
|
||||
-absl::malloc_internal
|
||||
-absl::demangle_internal
|
||||
-absl::optional
|
||||
-absl::stacktrace
|
||||
absl::base
|
||||
-absl::demangle_rust
|
||||
-absl::bad_optional_access
|
||||
-absl::strings_internal
|
||||
+absl::bits
|
||||
+absl::city
|
||||
+absl::civil_time
|
||||
+absl::config
|
||||
+absl::core_headers
|
||||
absl::debugging_internal
|
||||
-absl::int128
|
||||
-absl::spinlock_wait
|
||||
-absl::decode_rust_punycode
|
||||
-absl::raw_logging_internal
|
||||
-absl::flat_hash_set
|
||||
+absl::demangle_internal
|
||||
+absl::fixed_array
|
||||
+absl::flags
|
||||
absl::flat_hash_map
|
||||
+absl::flat_hash_set
|
||||
+absl::graphcycles_internal
|
||||
+absl::hash
|
||||
+absl::inlined_vector
|
||||
+absl::int128
|
||||
+absl::kernel_timeout_internal
|
||||
+absl::log_severity
|
||||
+absl::malloc_internal
|
||||
absl::node_hash_map
|
||||
absl::node_hash_set
|
||||
-absl::compare
|
||||
-absl::base_internal
|
||||
absl::nullability
|
||||
-absl::bounded_utf8_length_sequence
|
||||
-absl::log_severity
|
||||
-absl::type_traits
|
||||
-absl::atomic_hook
|
||||
-absl::bits
|
||||
-absl::flags_commandlineflag_internal
|
||||
-absl::hash_container_defaults
|
||||
absl::numeric_representation
|
||||
-absl::node_slot_policy
|
||||
-absl::core_headers
|
||||
-absl::dynamic_annotations
|
||||
-absl::utf8_for_code_point
|
||||
-absl::errno_saver
|
||||
-absl::absl_check
|
||||
-absl::hash_function_defaults
|
||||
-absl::function_ref
|
||||
-absl::city
|
||||
-absl::low_level_hash
|
||||
-absl::fixed_array
|
||||
-absl::variant
|
||||
-absl::meta
|
||||
-absl::log_internal_voidify
|
||||
-absl::log_sink
|
||||
-absl::log_internal_log_sink_set
|
||||
-absl::log_sink_registry
|
||||
-absl::log_entry
|
||||
-absl::log_globals
|
||||
-absl::log_internal_nullguard
|
||||
-absl::examine_stack
|
||||
-absl::inlined_vector
|
||||
-absl::log_internal_proto
|
||||
-absl::strerror
|
||||
-absl::log_internal_config
|
||||
-absl::raw_hash_map
|
||||
+absl::optional
|
||||
absl::raw_hash_set
|
||||
-absl::container_memory
|
||||
-absl::algorithm_container
|
||||
+absl::raw_logging_internal
|
||||
absl::span
|
||||
-absl::log_internal_nullstream
|
||||
-absl::vlog_config_internal
|
||||
-absl::flags_reflection
|
||||
-absl::flags_internal
|
||||
-absl::flags_config
|
||||
-absl::fast_type_id
|
||||
-absl::utility
|
||||
-absl::time_zone
|
||||
-absl::civil_time
|
||||
+absl::spinlock_wait
|
||||
+absl::stacktrace
|
||||
+absl::str_format
|
||||
+absl::str_format_internal
|
||||
+absl::string_view
|
||||
absl::string_view
|
||||
+absl::strings
|
||||
+absl::strings_internal
|
||||
+absl::symbolize
|
||||
+absl::synchronization
|
||||
absl::throw_delegate
|
||||
-absl::memory
|
||||
-absl::charset
|
||||
-absl::endian
|
||||
-absl::config)
|
||||
+absl::time
|
||||
+absl::time_zone
|
||||
+absl::type_traits
|
||||
+absl::utility)
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
"${ONNXRUNTIME_ROOT}/core/providers/shared/*.h"
|
||||
--- a/cmake/onnxruntime_python.cmake
|
||||
+++ b/cmake/onnxruntime_python.cmake
|
||||
@@ -740,7 +740,6 @@
|
||||
@@ -785,7 +785,6 @@
|
||||
|
||||
if (NOT onnxruntime_MINIMAL_BUILD AND NOT onnxruntime_EXTENDED_MINIMAL_BUILD
|
||||
AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS|visionOS|tvOS"
|
||||
- AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android"
|
||||
AND NOT onnxruntime_USE_ROCM
|
||||
AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
|
||||
add_custom_command(
|
||||
TARGET onnxruntime_pybind11_state POST_BUILD
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
From c79a2c525edce42523b35da3edb87ae937a6e5b1 Mon Sep 17 00:00:00 2001
|
||||
From: Yulong Wang <7679871+fs-eire@users.noreply.github.com>
|
||||
Date: Thu, 31 Jul 2025 15:02:37 -0700
|
||||
Subject: [PATCH] [build] fix macOS x86_64 cross-compile warning
|
||||
|
||||
---
|
||||
cmake/CMakeLists.txt | 1 +
|
||||
cmake/onnxruntime_config.h.in | 1 +
|
||||
.../lib/sqnbitgemm_kernel_avx2_int8_blklen32.h | 17 +++++++++++++++++
|
||||
3 files changed, 19 insertions(+)
|
||||
|
||||
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
|
||||
index a76be16572a03..bdc18c424efd1 100644
|
||||
--- a/cmake/CMakeLists.txt
|
||||
+++ b/cmake/CMakeLists.txt
|
||||
@@ -558,6 +558,7 @@ else()
|
||||
check_cxx_compiler_flag(-Wambiguous-reversed-operator HAS_AMBIGUOUS_REVERSED_OPERATOR)
|
||||
# -Winterference-size was added in GCC 13
|
||||
check_cxx_compiler_flag(-Winterference-size HAS_INTERFERENCE_SIZE)
|
||||
+ check_cxx_compiler_flag(-Warray-bounds HAS_ARRAY_BOUNDS)
|
||||
check_cxx_compiler_flag(-Wbitwise-instead-of-logical HAS_BITWISE_INSTEAD_OF_LOGICAL)
|
||||
check_cxx_compiler_flag(-Wcast-function-type HAS_CAST_FUNCTION_TYPE)
|
||||
check_cxx_compiler_flag(-Wcatch-value HAS_CATCH_VALUE)
|
||||
diff --git a/cmake/onnxruntime_config.h.in b/cmake/onnxruntime_config.h.in
|
||||
index f82a23bf4026b..a36f735c507ba 100644
|
||||
--- a/cmake/onnxruntime_config.h.in
|
||||
+++ b/cmake/onnxruntime_config.h.in
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
+#cmakedefine HAS_ARRAY_BOUNDS
|
||||
#cmakedefine HAS_BITWISE_INSTEAD_OF_LOGICAL
|
||||
#cmakedefine HAS_CAST_FUNCTION_TYPE
|
||||
#cmakedefine HAS_CATCH_VALUE
|
||||
diff --git a/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h b/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
|
||||
index d2d9886ab61f7..a745dd9f1376d 100644
|
||||
--- a/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
|
||||
+++ b/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
|
||||
@@ -1660,7 +1660,24 @@ MlasQ4Int8TileGemmKernelBlkLen32Avx2(
|
||||
|
||||
if constexpr (NCols4 == 8) {
|
||||
__m128 acc_0 = FoldAccumulators(acc[0], acc[1], acc[2], acc[3]);
|
||||
+
|
||||
+ // Clang is not happy with the code here, even if constexpr `NCols4 == 8` is always false in this context:
|
||||
+ //
|
||||
+ // In file included from .../onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2.cpp:26:
|
||||
+ // .../onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:1663:49: error: array index 4 is past the end of the array (that has type '__m256[4]') [-Werror,-Warray-bounds]
|
||||
+ // 1663 | __m128 acc_1 = FoldAccumulators(acc[4], acc[5], acc[6], acc[7]);
|
||||
+ // | ^ ~
|
||||
+ // .../onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h:1531:13: note: array 'acc' declared here
|
||||
+ // 1531 | __m256 acc[NCols4];
|
||||
+ // | ^
|
||||
+#if defined(__clang__)
|
||||
+#pragma clang diagnostic push
|
||||
+#pragma clang diagnostic ignored "-Warray-bounds"
|
||||
+#endif
|
||||
__m128 acc_1 = FoldAccumulators(acc[4], acc[5], acc[6], acc[7]);
|
||||
+#if defined(__clang__)
|
||||
+#pragma clang diagnostic pop
|
||||
+#endif
|
||||
if (BiasPtr != nullptr) {
|
||||
acc_0 = _mm_add_ps(acc_0, _mm_loadu_ps(BiasPtr));
|
||||
acc_1 = _mm_add_ps(acc_1, _mm_loadu_ps(BiasPtr + 4));
|
||||
10
packages/onnxruntime/0006-iwyu-onnxruntime_config.h.patch
Normal file
10
packages/onnxruntime/0006-iwyu-onnxruntime_config.h.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
|
||||
+++ b/onnxruntime/core/mlas/lib/sqnbitgemm_kernel_avx2_int8_blklen32.h
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <cassert>
|
||||
#include <utility>
|
||||
|
||||
+#include "onnxruntime_config.h"
|
||||
#include "qnbitgemm.h"
|
||||
#include "sqnbitgemm_kernel_avx_common.h"
|
||||
|
||||
@@ -2,8 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://onnxruntime.ai/
|
||||
TERMUX_PKG_DESCRIPTION="Cross-platform, high performance ML inferencing and training accelerator"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="1.23.2"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_VERSION="1.24.1"
|
||||
TERMUX_PKG_SRCURL=git+https://github.com/microsoft/onnxruntime
|
||||
TERMUX_PKG_DEPENDS="abseil-cpp, libc++, protobuf, libre2"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
Reference in New Issue
Block a user