From bf33919afba1fe55258f644f3136fb073a85b2c2 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 7 Dec 2023 15:55:17 -0800 Subject: [PATCH] Update absl and gtest to fix an ARM64EC build error (#18735) ### Description Update absl and gtest to fix an ARM64EC build error ### Motivation and Context We need to get an important fix into ORT. The fix is: https://github.com/abseil/abseil-cpp/commit/8028a87c96df0fff5ab58daeec30c43ce6fb0d20 --- cgmanifests/generated/cgmanifest.json | 6 +++--- cmake/deps.txt | 4 ++-- .../abseil/absl_gh_issue_1435_workaround.patch | 17 ----------------- .../kernel_type_str_resolver_utils_test.cc | 2 +- .../test/mlas/unittest/test_activation.cpp | 2 +- .../mac-objc-static-analysis-ci-pipeline.yml | 5 ----- .../azure-pipelines/templates/download-deps.yml | 4 ++-- 7 files changed, 9 insertions(+), 31 deletions(-) delete mode 100644 cmake/patches/abseil/absl_gh_issue_1435_workaround.patch diff --git a/cgmanifests/generated/cgmanifest.json b/cgmanifests/generated/cgmanifest.json index 12fbb291c3..5a016717f7 100644 --- a/cgmanifests/generated/cgmanifest.json +++ b/cgmanifests/generated/cgmanifest.json @@ -36,7 +36,7 @@ "component": { "type": "git", "git": { - "commitHash": "29bf8085f3bf17b84d30e34b3d7ff8248fda404e", + "commitHash": "3abf3298b6b43acc8556b1342ffb6de4a85fb30f", "repositoryUrl": "https://github.com/abseil/abseil-cpp.git" }, "comments": "abseil_cpp" @@ -126,7 +126,7 @@ "component": { "type": "git", "git": { - "commitHash": "f8d7d77c06936315286eb55f8de22cd23c188571", + "commitHash": "b3a9ba2b8e975550799838332803d468797ae2e1", "repositoryUrl": "https://github.com/google/googletest.git" }, "comments": "googletest" @@ -316,7 +316,7 @@ "component": { "type": "git", "git": { - "commitHash": "a4f72a314a85732ed67d5aa8d1088d207a7e0e61", + "commitHash": "5356c4a943a35e74d7cdc69486afcb8703b9a59a", "repositoryUrl": "https://github.com/ROCmSoftwarePlatform/composable_kernel.git" }, "comments": "composable_kernel" diff --git a/cmake/deps.txt b/cmake/deps.txt index e065cacdfc..8a9ccef6f8 100644 --- a/cmake/deps.txt +++ b/cmake/deps.txt @@ -12,7 +12,7 @@ # NOTE: You must run deps_update_and_upload.py and generate_cgmanifest.py when ready to test your changes in a CI. # See https://microsoft.sharepoint.com/teams/ONNX2/_layouts/OneNote.aspx?id=%2Fteams%2FONNX2%2FShared%20Documents%2FNotebooks%2FONNX%20Ecosystem%20Team%20Notebook&wd=target%28Development.one%7C63D3AB47-51D1-4A62-9965-66882234BD44%2FAdd%20or%20update%20a%20dependency%20in%20deps.txt%7C0E9ED71D-89D5-40FA-B05F-C0123289C591%2F%29 # -abseil_cpp;https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.zip;04271dfbfac59269b6939e1e9d5faf0d18a7ba91 +abseil_cpp;https://github.com/abseil/abseil-cpp/archive/3abf3298b6b43acc8556b1342ffb6de4a85fb30f.zip;d6da50a47c1268b5d6d5405b7fc21258ccd84d31 cxxopts;https://github.com/jarro2783/cxxopts/archive/3c73d91c0b04e2b59462f0a741be8c07024c1bc0.zip;6c6ca7f8480b26c8d00476e0e24b7184717fe4f0 date;https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.zip;2dac0c81dc54ebdd8f8d073a75c053b04b56e159 dlpack;https://github.com/dmlc/dlpack/archive/refs/tags/v0.6.zip;4d565dd2e5b31321e5549591d78aa7f377173445 @@ -27,7 +27,7 @@ fp16;https://github.com/Maratyszcza/FP16/archive/0a92994d729ff76a58f692d3028ca1b fxdiv;https://github.com/Maratyszcza/FXdiv/archive/63058eff77e11aa15bf531df5dd34395ec3017c8.zip;a5658f4036402dbca7cebee32be57fb8149811e1 google_benchmark;https://github.com/google/benchmark/archive/refs/tags/v1.7.0.zip;e97c368b176e8614e3f1bf13dd9abcf6a7ad9908 google_nsync;https://github.com/google/nsync/archive/refs/tags/1.26.0.zip;5e7c00ef6bf5b787386fc040067903ec774e2752 -googletest;https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip;0ac421f2ec11af38b0fff0f1992184032731a8bc +googletest;https://github.com/google/googletest/archive/b3a9ba2b8e975550799838332803d468797ae2e1.zip;0ac421f2ec11af38b0fff0f1992184032731a8bc googlexnnpack;https://github.com/google/XNNPACK/archive/0da379fc4808f9601faef392352018c741c0f297.zip;663883491e380b628e0a5b162b5f2658032fae73 json;https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.zip;f257f8dc27c5b8c085dc887b40cddd18ae1f725c microsoft_gsl;https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.zip;cf368104cd22a87b4dd0c80228919bb2df3e2a14 diff --git a/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch b/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch deleted file mode 100644 index 0a864cdc01..0000000000 --- a/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- absl/container/internal/layout.h 2023-11-28 09:35:48 -+++ absl/container/internal/layout.updated.h 2023-11-28 10:13:14 -@@ -181,9 +181,11 @@ - #include - #endif - --#if defined(__GXX_RTTI) --#define ABSL_INTERNAL_HAS_CXA_DEMANGLE --#endif -+// Comment out ABSL_INTERNAL_HAS_CXA_DEMANGLE definition to work around this issue: -+// https://github.com/abseil/abseil-cpp/issues/1435 -+// #if defined(__GXX_RTTI) -+// #define ABSL_INTERNAL_HAS_CXA_DEMANGLE -+// #endif - - #ifdef ABSL_INTERNAL_HAS_CXA_DEMANGLE - #include diff --git a/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc b/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc index 1c6721fed0..86ffef6c49 100644 --- a/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc +++ b/onnxruntime/test/framework/kernel_type_str_resolver_utils_test.cc @@ -5,7 +5,7 @@ #include #include - +#include #include "gtest/gtest.h" #include "core/flatbuffers/schema/ort.fbs.h" diff --git a/onnxruntime/test/mlas/unittest/test_activation.cpp b/onnxruntime/test/mlas/unittest/test_activation.cpp index 2bb0bbcd35..a4334c6c80 100644 --- a/onnxruntime/test/mlas/unittest/test_activation.cpp +++ b/onnxruntime/test/mlas/unittest/test_activation.cpp @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - +#include #include "test_util.h" class MlasActivationTest : public MlasTestBase { diff --git a/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml index 482279fa07..6893fb95cf 100644 --- a/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/mac-objc-static-analysis-ci-pipeline.yml @@ -29,11 +29,6 @@ jobs: --build --parallel --target onnx_proto displayName: Generate compile_commands.json and ONNX protobuf files - - script: | - patch < "$(Build.SourcesDirectory)/cmake/patches/abseil/absl_gh_issue_1435_workaround.patch" - workingDirectory: "$(Build.BinariesDirectory)/Debug/_deps/abseil_cpp-src" - displayName: Apply absl_gh_issue_1435_workaround.patch - - script: | set -e diff --git a/tools/ci_build/github/azure-pipelines/templates/download-deps.yml b/tools/ci_build/github/azure-pipelines/templates/download-deps.yml index 7484e0285f..9ef1aed55d 100644 --- a/tools/ci_build/github/azure-pipelines/templates/download-deps.yml +++ b/tools/ci_build/github/azure-pipelines/templates/download-deps.yml @@ -11,7 +11,7 @@ steps: packageType: upack feed: '/7424c8e4-5c62-490e-95c4-79446f31017c' definition: '517c4f6f-5437-4392-a70d-4f15ec5be2f0' - version: 1.0.120 + version: 1.0.128 downloadPath: $(Build.BinariesDirectory)/deps # The private ADO project @@ -22,7 +22,7 @@ steps: packageType: upack feed: '/4c7631f5-24c0-4307-8822-1aa8f180c325' definition: 'fd9dd5ad-b73e-4678-890e-edcf680dbc1a' - version: 1.0.120 + version: 1.0.128 downloadPath: $(Build.BinariesDirectory)/deps # You can add more ADO accounts at here.