Files
guru/sci-libs/onnxruntime/files/onnxruntime-1.23.2-fix-compilation-errors.patch
Pavel Sobolev 7dbd6abfbd sci-libs/onnxruntime: add 1.23.2, drop 1.22.2
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
2025-12-10 19:14:12 +03:00

59 lines
2.4 KiB
Diff

From: Pavel Sobolev <contact@paveloom.dev>
Subject: [PATCH] Fix compilation errors.
Signed-off-by: Pavel Sobolev <contact@paveloom.dev>
--- a/onnxruntime/core/common/semver.h
+++ b/onnxruntime/core/common/semver.h
@@ -3,6 +3,7 @@
#pragma once
+#include <cstdint>
#include <optional>
#include <string_view>
--- a/onnxruntime/core/optimizer/transformer_memcpy.cc
+++ b/onnxruntime/core/optimizer/transformer_memcpy.cc
@@ -16,7 +16,7 @@ namespace onnxruntime {
static ProviderTypeToProviderMap GetProvidersByType(
const InlinedVector<gsl::not_null<const IExecutionProvider*>>& providers) {
ProviderTypeToProviderMap providers_by_type{};
- for (const auto provider : providers) {
+ for (const auto& provider : providers) {
providers_by_type.emplace(provider->Type(), provider);
}
return providers_by_type;
@@ -100,7 +100,7 @@ static const onnx::TensorProto* GetInitializer(const Graph& graph, const std::st
// and mainly provides the subgraph recursion functionality
Status MemcpyTransformer::ApplyImpl(Graph& graph, bool& modified, int graph_level,
const logging::Logger& logger) const {
- for (const auto provider : providers_) {
+ for (const auto& provider : providers_) {
const auto& provider_type = provider->Type();
if (!utils::ProviderIsCpuBased(*provider)) {
TransformerMemcpyImpl copy_impl(graph, *provider, providers_by_type_);
--- a/onnxruntime/test/contrib_ops/gather_block_quantized_op_test.cc
+++ b/onnxruntime/test/contrib_ops/gather_block_quantized_op_test.cc
@@ -82,7 +82,7 @@ void CheckDataAndShape(const std::vector<T>& data, const std::vector<int64_t>& s
ORT_ENFORCE(static_cast<int64_t>(data.size()) == total_elements, "Data size does not match the shape",
"Data size: ", data.size(), ", Expected size: ", total_elements,
- ", Shape: ", VectorToString(shape), " Name:", name, " Type:", typeid(T).name());
+ ", Shape: ", VectorToString(shape), " Name:", name);
}
// Combinations: types, gather_axis, quantize_axis, block_size, indices, scale shape vs data shape
--- a/onnxruntime/test/onnx/pb_helper.h
+++ b/onnxruntime/test/onnx/pb_helper.h
@@ -41,7 +41,7 @@
#include <google/protobuf/message_lite.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl.h>
-#include <onnx/onnx-data_pb.h>
+#include <onnx/onnx-data.pb.h>
#include "tml.pb.h"
#ifdef __GNUC__
#pragma GCC diagnostic pop