From: Pavel Sobolev Subject: [PATCH] Fix compilation errors. Signed-off-by: Pavel Sobolev --- a/onnxruntime/core/common/semver.h +++ b/onnxruntime/core/common/semver.h @@ -3,6 +3,7 @@ #pragma once +#include #include #include --- 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>& 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& data, const std::vector& s ORT_ENFORCE(static_cast(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 #include #include -#include +#include #include "tml.pb.h" #ifdef __GNUC__ #pragma GCC diagnostic pop