diff --git a/.github/workflows/windows_x86.yml b/.github/workflows/windows_x86.yml index 507eacf21cc5a..4652757c1d292 100644 --- a/.github/workflows/windows_x86.yml +++ b/.github/workflows/windows_x86.yml @@ -87,7 +87,7 @@ jobs: - name: Build and Test shell: pwsh run: | - python.exe "${{ github.workspace }}\tools\ci_build\build.py" --config RelWithDebInfo --build_dir "${{ github.workspace }}\build" --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --enable_onnx_tests --build_wheel --msbuild_extra_options "IncludeMobileTargets=false" --build_nuget --use_vcpkg --use_vcpkg_ms_internal_asset_cache + python.exe "${{ github.workspace }}\tools\ci_build\build.py" --config RelWithDebInfo --build_dir "${{ github.workspace }}\build" --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --enable_onnx_tests --build_wheel --msbuild_extra_options "IncludeMobileTargets=false" --build_nuget --compile_no_warning_as_error --use_vcpkg --use_vcpkg_ms_internal_asset_cache if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 4da2d9e64d3d0..c6e16d4a3920f 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1336,7 +1336,7 @@ function(onnxruntime_configure_target target_name) if(WIN32 AND onnxruntime_ENABLE_STATIC_ANALYSIS AND onnxruntime_USE_CUSTOM_STATIC_ANALYSIS_RULES) set_target_properties(${target_name} PROPERTIES VS_USER_PROPS ${PROJECT_SOURCE_DIR}/EnableVisualStudioCodeAnalysis.props) endif() - target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} ${abseil_cpp_SOURCE_DIR}) + target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT}) if (onnxruntime_ENABLE_TRAINING_OPS) target_include_directories(${target_name} PRIVATE ${ORTTRAINING_ROOT}) endif() diff --git a/cmake/deps.txt b/cmake/deps.txt index f2911b48b1af5..0f2f02305a992 100644 --- a/cmake/deps.txt +++ b/cmake/deps.txt @@ -9,7 +9,7 @@ #since the file contains a version string: "lts_20230802". However, the file is for debugging purposes only and would #not affect built binaries. # -abseil_cpp;https://github.com/abseil/abseil-cpp/archive/refs/tags/20240722.0.zip;36ee53eb1466fb6e593fc5c286680de31f8a494a +abseil_cpp;https://github.com/abseil/abseil-cpp/archive/refs/tags/20250512.0.zip;3d6ff7e7ce144d9a53a53bef1f1bf79e1da4b8e1 coremltools;https://github.com/apple/coremltools/archive/refs/tags/7.1.zip;f1bab0f30966f2e217d8e01207d518f230a1641a cxxopts;https://github.com/jarro2783/cxxopts/archive/3c73d91c0b04e2b59462f0a741be8c07024c1bc0.zip;6c6ca7f8480b26c8d00476e0e24b7184717fe4f0 date;https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.zip;2dac0c81dc54ebdd8f8d073a75c053b04b56e159 diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake index 488df5a4e0de8..eede60a4a977a 100644 --- a/cmake/external/abseil-cpp.cmake +++ b/cmake/external/abseil-cpp.cmake @@ -27,7 +27,7 @@ else() endif() # NB! Advancing Abseil version changes its internal namespace, -# currently absl::lts_20240116 which affects abseil-cpp.natvis debugger +# currently absl::lts_20250512 which affects abseil-cpp.natvis debugger # visualization file, that must be adjusted accordingly, unless we eliminate # that namespace at build time. onnxruntime_fetchcontent_declare( @@ -36,7 +36,7 @@ onnxruntime_fetchcontent_declare( URL_HASH SHA1=${DEP_SHA1_abseil_cpp} EXCLUDE_FROM_ALL PATCH_COMMAND ${ABSL_PATCH_COMMAND} - FIND_PACKAGE_ARGS 20240722 NAMES absl + FIND_PACKAGE_ARGS 20250512 NAMES absl ) onnxruntime_fetchcontent_makeavailable(abseil_cpp) diff --git a/cmake/external/abseil-cpp.natvis b/cmake/external/abseil-cpp.natvis index e995e215432a2..75374e0fa9fba 100644 --- a/cmake/external/abseil-cpp.natvis +++ b/cmake/external/abseil-cpp.natvis @@ -1,6 +1,6 @@ - + @@ -24,7 +24,7 @@ - + @@ -51,7 +51,7 @@ - + *($T1 *){value} (*($T1 *){value}) @@ -60,7 +60,7 @@ - + *($T1 *)this (*($T1 *)this) @@ -68,7 +68,7 @@ - + {value.first}, {value.second} ({value.first}, {value.second}) diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake index 1e26eede8a66f..5dcc2b2628bf4 100644 --- a/cmake/onnxruntime_common.cmake +++ b/cmake/onnxruntime_common.cmake @@ -120,16 +120,14 @@ if (onnxruntime_USE_MIMALLOC) target_link_libraries(onnxruntime_common PRIVATE onnxruntime_mimalloc_shim) endif() -if(NOT onnxruntime_DISABLE_ABSEIL) - target_include_directories(onnxruntime_common PRIVATE ${ABSEIL_SOURCE_DIR}) - if (MSVC) - set(ABSEIL_NATVIS_FILE "abseil-cpp.natvis") - target_sources( - onnxruntime_common - INTERFACE $) - endif() +if (MSVC) + set(ABSEIL_NATVIS_FILE "abseil-cpp.natvis") + target_sources( + onnxruntime_common + INTERFACE $) endif() + if (MSVC) set(EIGEN_NATVIS_FILE ${eigen_SOURCE_DIR}/debug/msvc/eigen.natvis) if (EXISTS ${EIGEN_NATVIS_FILE}) diff --git a/cmake/onnxruntime_lora.cmake b/cmake/onnxruntime_lora.cmake index 26ee21c645584..e0579f571e1e0 100644 --- a/cmake/onnxruntime_lora.cmake +++ b/cmake/onnxruntime_lora.cmake @@ -10,8 +10,7 @@ file(GLOB onnxruntime_lora_srcs CONFIGURE_DEPENDS source_group(TREE ${REPO_ROOT} FILES ${onnxruntime_lora_srcs}) onnxruntime_add_static_library(onnxruntime_lora ${onnxruntime_lora_srcs}) -onnxruntime_add_include_to_target(onnxruntime_lora onnx flatbuffers::flatbuffers Boost::mp11 ${GSL_TARGET}) -target_link_libraries(onnxruntime_lora onnxruntime_framework) +onnxruntime_add_include_to_target(onnxruntime_lora onnxruntime_framework onnxruntime_common onnx flatbuffers::flatbuffers Boost::mp11 ${GSL_TARGET}) if(onnxruntime_ENABLE_INSTRUMENT) target_compile_definitions(onnxruntime_lora PUBLIC ONNXRUNTIME_ENABLE_INSTRUMENT) diff --git a/cmake/patches/abseil/absl_windows.patch b/cmake/patches/abseil/absl_windows.patch index c50e147aa4a7d..036ead7b88e46 100644 --- a/cmake/patches/abseil/absl_windows.patch +++ b/cmake/patches/abseil/absl_windows.patch @@ -1,163 +1,44 @@ -diff --git a/absl/base/attributes.h b/absl/base/attributes.h -index 5ea5ee3e..f4949898 100644 ---- a/absl/base/attributes.h -+++ b/absl/base/attributes.h -@@ -559,7 +559,7 @@ - #undef ABSL_ATTRIBUTE_UNUSED - #define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__)) - #else --#define ABSL_ATTRIBUTE_UNUSED -+#define ABSL_ATTRIBUTE_UNUSED [[maybe_unused]] - #endif - - // ABSL_ATTRIBUTE_INITIAL_EXEC diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h -index d4fe8f5c..27418d13 100644 +index 3effc441..c339e269 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h -@@ -1924,7 +1924,7 @@ HashtablezInfoHandle SampleHashtablezInfo(size_t sizeof_slot, size_t sizeof_key, - // In SOO, we sample on the first insertion so if this is an empty SOO case - // (e.g. when reserve is called), then we still need to sample. - if (kSooEnabled && was_soo && c.size() == 0) { -- return Sample(sizeof_slot, sizeof_key, sizeof_value, SooCapacity()); -+ return Sample(sizeof_slot, sizeof_key, sizeof_value, (int16_t)SooCapacity()); - } - // For non-SOO cases, we sample whenever the capacity is increasing from zero - // to non-zero. -@@ -3525,7 +3525,7 @@ class raw_hash_set { - assert(is_soo()); - if (!ShouldSampleHashtablezInfo()) return HashtablezInfoHandle{}; - return Sample(sizeof(slot_type), sizeof(key_type), sizeof(value_type), -- SooCapacity()); -+ (int16_t)SooCapacity()); +@@ -1121,11 +1121,12 @@ class CommonFields : public CommonFieldsGenerationInfo { + #ifdef NDEBUG + f(); + return; +-#endif ++#else + const size_t cap = capacity(); + set_capacity(InvalidCapacity::kReentrance); + f(); + set_capacity(cap); ++#endif } - inline void destroy_slots() { -diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake -index da2282fe..4c7fc26f 100644 ---- a/absl/copts/GENERATED_AbseilCopts.cmake -+++ b/absl/copts/GENERATED_AbseilCopts.cmake -@@ -181,8 +181,6 @@ list(APPEND ABSL_MSVC_FLAGS - "/wd4005" - "/wd4068" - "/wd4180" -- "/wd4244" -- "/wd4267" - "/wd4503" - "/wd4800" - "/DNOMINMAX" -diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl -index b9e0071e..dd8410ec 100644 ---- a/absl/copts/GENERATED_copts.bzl -+++ b/absl/copts/GENERATED_copts.bzl -@@ -182,8 +182,6 @@ ABSL_MSVC_FLAGS = [ - "/wd4005", - "/wd4068", - "/wd4180", -- "/wd4244", -- "/wd4267", - "/wd4503", - "/wd4800", - "/DNOMINMAX", -diff --git a/absl/copts/copts.py b/absl/copts/copts.py -index 2d85ac74..4875d668 100644 ---- a/absl/copts/copts.py -+++ b/absl/copts/copts.py -@@ -118,10 +118,6 @@ MSVC_WARNING_FLAGS = [ - "/wd4068", # unknown pragma - # qualifier applied to function type has no meaning; ignored - "/wd4180", -- # conversion from 'type1' to 'type2', possible loss of data -- "/wd4244", -- # conversion from 'size_t' to 'type', possible loss of data -- "/wd4267", - # The decorated name was longer than the compiler limit - "/wd4503", - # forcing value to bool 'true' or 'false' (performance warning) -diff --git a/absl/debugging/symbolize.cc b/absl/debugging/symbolize.cc -index 638d3954..6b817075 100644 ---- a/absl/debugging/symbolize.cc -+++ b/absl/debugging/symbolize.cc -@@ -14,7 +14,7 @@ - - #include "absl/debugging/symbolize.h" - --#ifdef _WIN32 -+#if defined(_WIN32) && !defined(NDEBUG) - #include - #if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)) || \ - WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc -index 53a099a1..34d210d6 100644 ---- a/absl/debugging/symbolize_win32.inc -+++ b/absl/debugging/symbolize_win32.inc -@@ -35,15 +35,15 @@ ABSL_NAMESPACE_BEGIN - - static HANDLE process = NULL; - --void InitializeSymbolizer(const char*) { -- if (process != nullptr) { -- return; -- } -+namespace { -+void InitializeSymbolizerImpl() { -+ - process = GetCurrentProcess(); - - // Symbols are not loaded until a reference is made requiring the - // symbols be loaded. This is the fastest, most efficient way to use - // the symbol handler. -+ - SymSetOptions(SYMOPT_DEFERRED_LOADS | SYMOPT_UNDNAME); - if (!SymInitialize(process, nullptr, true)) { - // GetLastError() returns a Win32 DWORD, but we assign to -@@ -54,6 +54,36 @@ void InitializeSymbolizer(const char*) { - } - } - -+bool LookupAndInitialize(const void* pc, SYMBOL_INFO* symbol) { -+ auto hProcess = (process != NULL) ? process : GetCurrentProcess(); -+ if (SymFromAddr(hProcess, reinterpret_cast(pc), nullptr, symbol) != TRUE) { -+ if (GetLastError() == ERROR_INVALID_HANDLE && process == NULL) { -+ InitializeSymbolizerImpl(); -+ if (SymFromAddr(process, reinterpret_cast(pc), nullptr, symbol) != TRUE) { -+ return false; -+ } -+ } else { -+ return false; -+ } -+ return false; + private: +@@ -3344,11 +3345,14 @@ class raw_hash_set { + + // Asserts that hash and equal functors provided by the user are consistent, + // meaning that `eq(k1, k2)` implies `hash(k1)==hash(k2)`. +- template +- void AssertHashEqConsistent(const K& key) { + #ifdef NDEBUG ++ template ++ void AssertHashEqConsistent(const K&) { + return; +-#endif + } -+ return true; -+} -+} -+ -+void InitializeSymbolizer(const char*) { -+ if (process != nullptr) { -+ return; -+ } -+ -+ alignas(SYMBOL_INFO) char buf[sizeof(SYMBOL_INFO) + MAX_SYM_NAME]; -+ SYMBOL_INFO* symbol = reinterpret_cast(buf); -+ symbol->SizeOfStruct = sizeof(SYMBOL_INFO); -+ symbol->MaxNameLen = MAX_SYM_NAME; -+ -+ static_cast(LookupAndInitialize(reinterpret_cast(&InitializeSymbolizer), symbol)); -+} -+ - bool Symbolize(const void* pc, char* out, int out_size) { - if (out_size <= 0) { - return false; -@@ -62,9 +92,11 @@ bool Symbolize(const void* pc, char* out, int out_size) { - SYMBOL_INFO* symbol = reinterpret_cast(buf); - symbol->SizeOfStruct = sizeof(SYMBOL_INFO); - symbol->MaxNameLen = MAX_SYM_NAME; -- if (!SymFromAddr(process, reinterpret_cast(pc), nullptr, symbol)) { -+ -+ if(!LookupAndInitialize(pc, symbol)) { - return false; ++#else ++ template ++ void AssertHashEqConsistent(const K& key) { + // If the hash/eq functors are known to be consistent, then skip validation. + if (std::is_same::value && + std::is_same::value) { +@@ -3386,6 +3390,7 @@ class raw_hash_set { + if (capacity() > 16) return; + IterateOverFullSlots(common(), sizeof(slot_type), assert_consistent); } -+ - const size_t out_size_t = static_cast(out_size); - strncpy(out, symbol->Name, out_size_t); - if (out[out_size_t - 1] != '\0') { ++#endif + + // Attempts to find `key` in the table; if it isn't found, returns an iterator + // where the value can be inserted into, with the control byte already set to diff --git a/cmake/vcpkg-ports/abseil/absl_windows.patch b/cmake/vcpkg-ports/abseil/absl_windows.patch index c50e147aa4a7d..036ead7b88e46 100644 --- a/cmake/vcpkg-ports/abseil/absl_windows.patch +++ b/cmake/vcpkg-ports/abseil/absl_windows.patch @@ -1,163 +1,44 @@ -diff --git a/absl/base/attributes.h b/absl/base/attributes.h -index 5ea5ee3e..f4949898 100644 ---- a/absl/base/attributes.h -+++ b/absl/base/attributes.h -@@ -559,7 +559,7 @@ - #undef ABSL_ATTRIBUTE_UNUSED - #define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__)) - #else --#define ABSL_ATTRIBUTE_UNUSED -+#define ABSL_ATTRIBUTE_UNUSED [[maybe_unused]] - #endif - - // ABSL_ATTRIBUTE_INITIAL_EXEC diff --git a/absl/container/internal/raw_hash_set.h b/absl/container/internal/raw_hash_set.h -index d4fe8f5c..27418d13 100644 +index 3effc441..c339e269 100644 --- a/absl/container/internal/raw_hash_set.h +++ b/absl/container/internal/raw_hash_set.h -@@ -1924,7 +1924,7 @@ HashtablezInfoHandle SampleHashtablezInfo(size_t sizeof_slot, size_t sizeof_key, - // In SOO, we sample on the first insertion so if this is an empty SOO case - // (e.g. when reserve is called), then we still need to sample. - if (kSooEnabled && was_soo && c.size() == 0) { -- return Sample(sizeof_slot, sizeof_key, sizeof_value, SooCapacity()); -+ return Sample(sizeof_slot, sizeof_key, sizeof_value, (int16_t)SooCapacity()); - } - // For non-SOO cases, we sample whenever the capacity is increasing from zero - // to non-zero. -@@ -3525,7 +3525,7 @@ class raw_hash_set { - assert(is_soo()); - if (!ShouldSampleHashtablezInfo()) return HashtablezInfoHandle{}; - return Sample(sizeof(slot_type), sizeof(key_type), sizeof(value_type), -- SooCapacity()); -+ (int16_t)SooCapacity()); +@@ -1121,11 +1121,12 @@ class CommonFields : public CommonFieldsGenerationInfo { + #ifdef NDEBUG + f(); + return; +-#endif ++#else + const size_t cap = capacity(); + set_capacity(InvalidCapacity::kReentrance); + f(); + set_capacity(cap); ++#endif } - inline void destroy_slots() { -diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake -index da2282fe..4c7fc26f 100644 ---- a/absl/copts/GENERATED_AbseilCopts.cmake -+++ b/absl/copts/GENERATED_AbseilCopts.cmake -@@ -181,8 +181,6 @@ list(APPEND ABSL_MSVC_FLAGS - "/wd4005" - "/wd4068" - "/wd4180" -- "/wd4244" -- "/wd4267" - "/wd4503" - "/wd4800" - "/DNOMINMAX" -diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl -index b9e0071e..dd8410ec 100644 ---- a/absl/copts/GENERATED_copts.bzl -+++ b/absl/copts/GENERATED_copts.bzl -@@ -182,8 +182,6 @@ ABSL_MSVC_FLAGS = [ - "/wd4005", - "/wd4068", - "/wd4180", -- "/wd4244", -- "/wd4267", - "/wd4503", - "/wd4800", - "/DNOMINMAX", -diff --git a/absl/copts/copts.py b/absl/copts/copts.py -index 2d85ac74..4875d668 100644 ---- a/absl/copts/copts.py -+++ b/absl/copts/copts.py -@@ -118,10 +118,6 @@ MSVC_WARNING_FLAGS = [ - "/wd4068", # unknown pragma - # qualifier applied to function type has no meaning; ignored - "/wd4180", -- # conversion from 'type1' to 'type2', possible loss of data -- "/wd4244", -- # conversion from 'size_t' to 'type', possible loss of data -- "/wd4267", - # The decorated name was longer than the compiler limit - "/wd4503", - # forcing value to bool 'true' or 'false' (performance warning) -diff --git a/absl/debugging/symbolize.cc b/absl/debugging/symbolize.cc -index 638d3954..6b817075 100644 ---- a/absl/debugging/symbolize.cc -+++ b/absl/debugging/symbolize.cc -@@ -14,7 +14,7 @@ - - #include "absl/debugging/symbolize.h" - --#ifdef _WIN32 -+#if defined(_WIN32) && !defined(NDEBUG) - #include - #if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)) || \ - WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc -index 53a099a1..34d210d6 100644 ---- a/absl/debugging/symbolize_win32.inc -+++ b/absl/debugging/symbolize_win32.inc -@@ -35,15 +35,15 @@ ABSL_NAMESPACE_BEGIN - - static HANDLE process = NULL; - --void InitializeSymbolizer(const char*) { -- if (process != nullptr) { -- return; -- } -+namespace { -+void InitializeSymbolizerImpl() { -+ - process = GetCurrentProcess(); - - // Symbols are not loaded until a reference is made requiring the - // symbols be loaded. This is the fastest, most efficient way to use - // the symbol handler. -+ - SymSetOptions(SYMOPT_DEFERRED_LOADS | SYMOPT_UNDNAME); - if (!SymInitialize(process, nullptr, true)) { - // GetLastError() returns a Win32 DWORD, but we assign to -@@ -54,6 +54,36 @@ void InitializeSymbolizer(const char*) { - } - } - -+bool LookupAndInitialize(const void* pc, SYMBOL_INFO* symbol) { -+ auto hProcess = (process != NULL) ? process : GetCurrentProcess(); -+ if (SymFromAddr(hProcess, reinterpret_cast(pc), nullptr, symbol) != TRUE) { -+ if (GetLastError() == ERROR_INVALID_HANDLE && process == NULL) { -+ InitializeSymbolizerImpl(); -+ if (SymFromAddr(process, reinterpret_cast(pc), nullptr, symbol) != TRUE) { -+ return false; -+ } -+ } else { -+ return false; -+ } -+ return false; + private: +@@ -3344,11 +3345,14 @@ class raw_hash_set { + + // Asserts that hash and equal functors provided by the user are consistent, + // meaning that `eq(k1, k2)` implies `hash(k1)==hash(k2)`. +- template +- void AssertHashEqConsistent(const K& key) { + #ifdef NDEBUG ++ template ++ void AssertHashEqConsistent(const K&) { + return; +-#endif + } -+ return true; -+} -+} -+ -+void InitializeSymbolizer(const char*) { -+ if (process != nullptr) { -+ return; -+ } -+ -+ alignas(SYMBOL_INFO) char buf[sizeof(SYMBOL_INFO) + MAX_SYM_NAME]; -+ SYMBOL_INFO* symbol = reinterpret_cast(buf); -+ symbol->SizeOfStruct = sizeof(SYMBOL_INFO); -+ symbol->MaxNameLen = MAX_SYM_NAME; -+ -+ static_cast(LookupAndInitialize(reinterpret_cast(&InitializeSymbolizer), symbol)); -+} -+ - bool Symbolize(const void* pc, char* out, int out_size) { - if (out_size <= 0) { - return false; -@@ -62,9 +92,11 @@ bool Symbolize(const void* pc, char* out, int out_size) { - SYMBOL_INFO* symbol = reinterpret_cast(buf); - symbol->SizeOfStruct = sizeof(SYMBOL_INFO); - symbol->MaxNameLen = MAX_SYM_NAME; -- if (!SymFromAddr(process, reinterpret_cast(pc), nullptr, symbol)) { -+ -+ if(!LookupAndInitialize(pc, symbol)) { - return false; ++#else ++ template ++ void AssertHashEqConsistent(const K& key) { + // If the hash/eq functors are known to be consistent, then skip validation. + if (std::is_same::value && + std::is_same::value) { +@@ -3386,6 +3390,7 @@ class raw_hash_set { + if (capacity() > 16) return; + IterateOverFullSlots(common(), sizeof(slot_type), assert_consistent); } -+ - const size_t out_size_t = static_cast(out_size); - strncpy(out, symbol->Name, out_size_t); - if (out[out_size_t - 1] != '\0') { ++#endif + + // Attempts to find `key` in the table; if it isn't found, returns an iterator + // where the value can be inserted into, with the control byte already set to diff --git a/cmake/vcpkg-ports/abseil/portfile.cmake b/cmake/vcpkg-ports/abseil/portfile.cmake index 16a9bd86b06a5..0017b8ef74b40 100644 --- a/cmake/vcpkg-ports/abseil/portfile.cmake +++ b/cmake/vcpkg-ports/abseil/portfile.cmake @@ -6,19 +6,11 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp REF "${VERSION}" - SHA512 bd2cca8f007f2eee66f51c95a979371622b850ceb2ce3608d00ba826f7c494a1da0fba3c1427728f2c173fe50d59b701da35c2c9fdad2752a5a49746b1c8ef31 + SHA512 92542db666e0c628cf56bf8ad09412af9c8b622e4f26e72d1e1b092ceec430a5c105f6561e2d9983af565f55da07f67e770cafe373b20cc4cb29a893a6a236fc HEAD_REF master PATCHES absl_windows.patch ) -# With ABSL_PROPAGATE_CXX_STD=ON abseil automatically detect if it is being -# compiled with C++14 or C++17, and modifies the installed `absl/base/options.h` -# header accordingly. This works even if CMAKE_CXX_STANDARD is not set. Abseil -# uses the compiler default behavior to update `absl/base/options.h` as needed. -set(ABSL_USE_CXX17_OPTION "") -if("cxx17" IN_LIST FEATURES) - set(ABSL_USE_CXX17_OPTION "-DCMAKE_CXX_STANDARD=17") -endif() set(ABSL_STATIC_RUNTIME_OPTION "") if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") diff --git a/cmake/vcpkg-ports/abseil/vcpkg.json b/cmake/vcpkg-ports/abseil/vcpkg.json index 1b8bccfbae03b..ca184edf2cdb7 100644 --- a/cmake/vcpkg-ports/abseil/vcpkg.json +++ b/cmake/vcpkg-ports/abseil/vcpkg.json @@ -1,6 +1,6 @@ { "name": "abseil", - "version": "20240722.0", + "version": "20250512.0", "description": [ "Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.", "In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.", @@ -17,10 +17,5 @@ "name": "vcpkg-cmake-config", "host": true } - ], - "features": { - "cxx17": { - "description": "Enable compiler C++17." - } - } + ] } diff --git a/onnxruntime/core/providers/js/operators/resize.h b/onnxruntime/core/providers/js/operators/resize.h index 3e8ccf40753c8..bf04bbd3825c3 100644 --- a/onnxruntime/core/providers/js/operators/resize.h +++ b/onnxruntime/core/providers/js/operators/resize.h @@ -107,7 +107,6 @@ class Resize : public JsKernel, public UpsampleBase { } virtual Status SerializeCustomData(OpKernelContext* context, AllocatorPtr alloc, void** ptr, size_t* size) const { - TensorShapeVector output_dims; std::vector roi_array; std::vector scales_array; diff --git a/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder_helpers.cc b/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder_helpers.cc index 1c82d5e7452fd..c64a2df1ee8ce 100644 --- a/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder_helpers.cc +++ b/onnxruntime/core/providers/nnapi/nnapi_builtin/builders/op_builder_helpers.cc @@ -1060,7 +1060,6 @@ Status AddReshapeOperator(ModelBuilder& model_builder, const auto& operand_types(model_builder.GetOperandTypes()); const auto& output = node_unit.Outputs()[0].node_arg.Name(); - const auto input_shape = shaper[input]; const auto output_shape = shaper[output]; // For reshape, the output type should be the same as the input type except the shape is different diff --git a/tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh b/tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh index 02f89f4e91e5c..1d9d7f43fd10d 100755 --- a/tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh +++ b/tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh @@ -34,7 +34,7 @@ python3 $ORT_ROOT/tools/ci_build/build.py \ --disable_ml_ops \ --disable_exceptions \ --include_ops_by_config $ORT_ROOT/onnxruntime/test/testdata/required_ops_and_types.config \ - --skip_tests + --skip_tests --use_vcpkg --use_vcpkg_ms_internal_asset_cache # Push onnxruntime_test_all and testdata to emulator adb push $MIN_BUILD_DIR/Debug/onnxruntime_test_all /data/local/tmp/