From 39de8117e72ad0beb542ab8717a40874000d4445 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Jul 2024 23:23:26 +0000 Subject: [PATCH 01/28] update --- js/node/CMakeLists.txt | 51 +++++++++--------------------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/js/node/CMakeLists.txt b/js/node/CMakeLists.txt index 5c32f62f3a80..e0f9465565ab 100644 --- a/js/node/CMakeLists.txt +++ b/js/node/CMakeLists.txt @@ -59,8 +59,11 @@ endif() file(GLOB ORT_NODEJS_BINDING_SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/*.cc) add_library(onnxruntime_binding SHARED ${ORT_NODEJS_BINDING_SOURCE_FILES} ${CMAKE_JS_SRC}) +file(MAKE_DIRECTORY ${dist_folder}) + set_target_properties(onnxruntime_binding PROPERTIES PREFIX "" SUFFIX ".node" + RUNTIME_OUTPUT_DIRECTORY ${dist_folder} BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH_USE_LINK_PATH FALSE) target_link_libraries(onnxruntime_binding PRIVATE ${CMAKE_JS_LIB}) @@ -95,52 +98,20 @@ else() set_target_properties(onnxruntime_binding PROPERTIES INSTALL_RPATH "$ORIGIN/") endif() -# post build - -add_custom_command( - TARGET onnxruntime_binding POST_BUILD - COMMAND ${CMAKE_COMMAND} -E make_directory ${dist_folder} - COMMAND ${CMAKE_COMMAND} -E copy $ ${dist_folder} -) if (WIN32) - add_custom_command( - TARGET onnxruntime_binding POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${ONNXRUNTIME_WIN_BIN_DIR}/onnxruntime.dll - ${dist_folder} - ) + file(COPY ${ONNXRUNTIME_WIN_BIN_DIR}/onnxruntime.dll + DESTINATION ${dist_folder}) if (USE_DML) - add_custom_command( - TARGET onnxruntime_binding POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${ONNXRUNTIME_WIN_BIN_DIR}/DirectML.dll - ${dist_folder} - ) + file(COPY ${ONNXRUNTIME_WIN_BIN_DIR}/DirectML.dll + DESTINATION ${dist_folder}) endif () - if (CMAKE_BUILD_TYPE STREQUAL "Debug") - add_custom_command( - TARGET onnxruntime_binding POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${ONNXRUNTIME_WIN_BIN_DIR}/onnxruntime.pdb - ${dist_folder} - COMMAND ${CMAKE_COMMAND} -E copy $/onnxruntime_binding.pdb ${dist_folder} - ) - endif() elseif (APPLE) - add_custom_command( - TARGET onnxruntime_binding POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${ONNXRUNTIME_BUILD_DIR}/libonnxruntime.${ort_version}.dylib - ${dist_folder} - ) + file(COPY ${ONNXRUNTIME_BUILD_DIR}/libonnxruntime.dylib + DESTINATION ${dist_folder} FOLLOW_SYMLINK_CHAIN) elseif (UNIX) - add_custom_command( - TARGET onnxruntime_binding POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy - ${ONNXRUNTIME_BUILD_DIR}/libonnxruntime.so.${ort_version} - ${dist_folder} - ) + file(COPY ${ONNXRUNTIME_BUILD_DIR}/libonnxruntime.so + DESTINATION ${dist_folder} FOLLOW_SYMLINK_CHAIN) else() message(FATAL_ERROR "Platform not supported.") endif() From cd1b1d17f5653d10041dbe05863e5fdc900f7dc8 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Jul 2024 19:29:22 -0700 Subject: [PATCH 02/28] update --- js/node/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/node/CMakeLists.txt b/js/node/CMakeLists.txt index e0f9465565ab..0949df2e18d5 100644 --- a/js/node/CMakeLists.txt +++ b/js/node/CMakeLists.txt @@ -64,6 +64,9 @@ file(MAKE_DIRECTORY ${dist_folder}) set_target_properties(onnxruntime_binding PROPERTIES PREFIX "" SUFFIX ".node" RUNTIME_OUTPUT_DIRECTORY ${dist_folder} + RUNTIME_OUTPUT_DIRECTORY_DEBUG ${dist_folder} + RUNTIME_OUTPUT_DIRECTORY_RELEASE ${dist_folder} + RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${dist_folder} BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH_USE_LINK_PATH FALSE) target_link_libraries(onnxruntime_binding PRIVATE ${CMAKE_JS_LIB}) From 0f282b50bd04bb17c42ed34fa0a526fc27a73692 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Jul 2024 21:51:52 -0700 Subject: [PATCH 03/28] Update CMakeLists.txt --- js/node/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/node/CMakeLists.txt b/js/node/CMakeLists.txt index 0949df2e18d5..1ce6d66881c3 100644 --- a/js/node/CMakeLists.txt +++ b/js/node/CMakeLists.txt @@ -67,6 +67,10 @@ set_target_properties(onnxruntime_binding PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${dist_folder} RUNTIME_OUTPUT_DIRECTORY_RELEASE ${dist_folder} RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${dist_folder} + LIBRARY_OUTPUT_DIRECTORY ${dist_folder} + LIBRARY_OUTPUT_DIRECTORY_DEBUG ${dist_folder} + LIBRARY_OUTPUT_DIRECTORY_RELEASE ${dist_folder} + LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${dist_folder} BUILD_WITH_INSTALL_RPATH TRUE INSTALL_RPATH_USE_LINK_PATH FALSE) target_link_libraries(onnxruntime_binding PRIVATE ${CMAKE_JS_LIB}) @@ -92,12 +96,12 @@ else() endif() if (WIN32) - target_link_libraries(onnxruntime_binding PRIVATE onnxruntime.lib) + target_link_libraries(onnxruntime_binding PRIVATE onnxruntime) elseif (APPLE) target_link_libraries(onnxruntime_binding PRIVATE libonnxruntime.${ort_version}.dylib) set_target_properties(onnxruntime_binding PROPERTIES INSTALL_RPATH "@loader_path") else() - target_link_libraries(onnxruntime_binding PRIVATE libonnxruntime.so.${ort_version}) + target_link_libraries(onnxruntime_binding PRIVATE onnxruntime) set_target_properties(onnxruntime_binding PROPERTIES INSTALL_RPATH "$ORIGIN/") endif() From b1e60088c084ef3d3ecb1afd95836594e357164d Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Jul 2024 20:43:59 +0000 Subject: [PATCH 04/28] Update C++ dependencies --- cgmanifests/generated/cgmanifest.json | 10 +++++----- cmake/deps.txt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cgmanifests/generated/cgmanifest.json b/cgmanifests/generated/cgmanifest.json index 29eb7045fc29..66b305a6d36d 100644 --- a/cgmanifests/generated/cgmanifest.json +++ b/cgmanifests/generated/cgmanifest.json @@ -116,7 +116,7 @@ "component": { "type": "git", "git": { - "commitHash": "344117638c8ff7e239044fd0fa7085839fc03021", + "commitHash": "a6ad7fbbdc2e14fab82bb8a6d27760d700198cbf", "repositoryUrl": "https://github.com/google/benchmark.git" }, "comments": "google_benchmark" @@ -136,7 +136,7 @@ "component": { "type": "git", "git": { - "commitHash": "530d5c8c84abd2a46f38583ee817743c9b3a42b4", + "commitHash": "e39786088138f2749d64e9e90e0f9902daa77c40", "repositoryUrl": "https://github.com/google/googletest.git" }, "comments": "googletest" @@ -256,7 +256,7 @@ "component": { "type": "git", "git": { - "commitHash": "3e9dfa2866941655c56877882565e7577de6fc7b", + "commitHash": "941f45bcb51457884fa1afd6e24a67377d70f75c", "repositoryUrl": "https://github.com/pybind/pybind11.git" }, "comments": "pybind11" @@ -266,7 +266,7 @@ "component": { "type": "git", "git": { - "commitHash": "959002f82d7962a473d8bf301845f2af720e0aa4", + "commitHash": "ca678952a9a8eaa6de112d154e8e104b22f9ab3f", "repositoryUrl": "https://github.com/pytorch/cpuinfo.git" }, "comments": "pytorch_cpuinfo" @@ -276,7 +276,7 @@ "component": { "type": "git", "git": { - "commitHash": "2b354c6ad0d0479dcff68dab23fb0d1143a482c2", + "commitHash": "6dcd83d60f7944926bfd308cc13979fc53dd69ca", "repositoryUrl": "https://github.com/google/re2.git" }, "comments": "re2" diff --git a/cmake/deps.txt b/cmake/deps.txt index 72469603a088..839b204047c1 100644 --- a/cmake/deps.txt +++ b/cmake/deps.txt @@ -26,9 +26,9 @@ eigen;https://gitlab.com/libeigen/eigen/-/archive/e7248b26a1ed53fa030c5c459f7ea0 flatbuffers;https://github.com/google/flatbuffers/archive/refs/tags/v23.5.26.zip;59422c3b5e573dd192fead2834d25951f1c1670c fp16;https://github.com/Maratyszcza/FP16/archive/0a92994d729ff76a58f692d3028ca1b64b145d91.zip;b985f6985a05a1c03ff1bb71190f66d8f98a1494 fxdiv;https://github.com/Maratyszcza/FXdiv/archive/63058eff77e11aa15bf531df5dd34395ec3017c8.zip;a5658f4036402dbca7cebee32be57fb8149811e1 -google_benchmark;https://github.com/google/benchmark/archive/refs/tags/v1.8.3.zip;bf9870756ee3f8d2d3b346b24ee3600a41c74d3d +google_benchmark;https://github.com/google/benchmark/archive/refs/tags/v1.8.5.zip;bf9870756ee3f8d2d3b346b24ee3600a41c74d3d google_nsync;https://github.com/google/nsync/archive/refs/tags/1.26.0.zip;5e7c00ef6bf5b787386fc040067903ec774e2752 -googletest;https://github.com/google/googletest/archive/530d5c8c84abd2a46f38583ee817743c9b3a42b4.zip;5e3a61db2aa975cfd0f97ba92c818744e7fa7034 +googletest;https://github.com/google/googletest/archive/refs/tags/v1.15.0.zip;9d2d0af8d77ac726ea55d44a8fa727ec98311349 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 @@ -48,9 +48,9 @@ protoc_linux_aarch64;https://github.com/protocolbuffers/protobuf/releases/downlo protoc_mac_universal;https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-osx-universal_binary.zip;23710c3d1c2036d8d65a6a22234372fa2d7af9ef psimd;https://github.com/Maratyszcza/psimd/archive/072586a71b55b7f8c584153d223e95687148a900.zip;1f5454b01f06f9656b77e4a5e2e31d7422487013 pthreadpool;https://github.com/Maratyszcza/pthreadpool/archive/4fe0e1e183925bf8cfa6aae24237e724a96479b8.zip;07a0aa91dd9bf86f31b95497e00f31d8a261a4bd -pybind11;https://github.com/pybind/pybind11/archive/refs/tags/v2.12.0.zip;8482f57ed55c7b100672815a311d5450858723fb -pytorch_cpuinfo;https://github.com/pytorch/cpuinfo/archive/959002f82d7962a473d8bf301845f2af720e0aa4.zip;85da3caa60eb2b148613b443fbc2bfdc30689965 -re2;https://github.com/google/re2/archive/refs/tags/2024-05-01.tar.gz;206cfee5ee0b4c6844680ba66275e9e8faa77405 +pybind11;https://github.com/pybind/pybind11/archive/refs/tags/v2.13.1.zip;9255d5c8568debcc329dd42ed8f410ee139ac7b1 +pytorch_cpuinfo;https://github.com/pytorch/cpuinfo/archive/ca678952a9a8eaa6de112d154e8e104b22f9ab3f.zip;138bf57d2a110935330d1048dce6d7b82d17d377 +re2;https://github.com/google/re2/archive/refs/tags/2024-07-02.zip;646e1728269cde7fcef990bf4a8e87b047882e88 safeint;https://github.com/dcleblanc/SafeInt/archive/refs/tags/3.0.28.zip;23f252040ff6cb9f1fd18575b32fa8fb5928daac tensorboard;https://github.com/tensorflow/tensorboard/archive/373eb09e4c5d2b3cc2493f0949dc4be6b6a45e81.zip;67b833913605a4f3f499894ab11528a702c2b381 cutlass;https://github.com/NVIDIA/cutlass/archive/refs/tags/v3.5.0.zip;ae038931b9fc2c416c17d9cda91d9706b343f56d From 012ff61263d510bfbe764c29f96e31c4065cd133 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Jul 2024 20:44:54 +0000 Subject: [PATCH 05/28] Update download-deps.yml --- .../github/azure-pipelines/templates/download-deps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 cf350704f835..bf11730c2ce2 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.165 + version: 1.0.167 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.165 + version: 1.0.167 downloadPath: $(Build.BinariesDirectory)/deps # You can add more ADO accounts at here. From 91cf2e70ba1f8d60bb9a1406a336e053b69e9f3e Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Jul 2024 22:02:01 +0000 Subject: [PATCH 06/28] update benchmark's checksum --- cmake/deps.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/deps.txt b/cmake/deps.txt index 839b204047c1..9d206b6bb3ae 100644 --- a/cmake/deps.txt +++ b/cmake/deps.txt @@ -26,7 +26,7 @@ eigen;https://gitlab.com/libeigen/eigen/-/archive/e7248b26a1ed53fa030c5c459f7ea0 flatbuffers;https://github.com/google/flatbuffers/archive/refs/tags/v23.5.26.zip;59422c3b5e573dd192fead2834d25951f1c1670c fp16;https://github.com/Maratyszcza/FP16/archive/0a92994d729ff76a58f692d3028ca1b64b145d91.zip;b985f6985a05a1c03ff1bb71190f66d8f98a1494 fxdiv;https://github.com/Maratyszcza/FXdiv/archive/63058eff77e11aa15bf531df5dd34395ec3017c8.zip;a5658f4036402dbca7cebee32be57fb8149811e1 -google_benchmark;https://github.com/google/benchmark/archive/refs/tags/v1.8.5.zip;bf9870756ee3f8d2d3b346b24ee3600a41c74d3d +google_benchmark;https://github.com/google/benchmark/archive/refs/tags/v1.8.5.zip;cd47d3d272faf353600c8cc2fdec2b52d6f69177 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.15.0.zip;9d2d0af8d77ac726ea55d44a8fa727ec98311349 googlexnnpack;https://github.com/google/XNNPACK/archive/0da379fc4808f9601faef392352018c741c0f297.zip;663883491e380b628e0a5b162b5f2658032fae73 From 78ede6fd09cd13530f2f0556c632c6dd4c5c1db7 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Jul 2024 23:01:34 +0000 Subject: [PATCH 07/28] update --- cmake/external/abseil-cpp.cmake | 92 ++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 35 deletions(-) diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake index 6c5c4b21f5c5..2440b09a021d 100644 --- a/cmake/external/abseil-cpp.cmake +++ b/cmake/external/abseil-cpp.cmake @@ -50,46 +50,68 @@ endif() # 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::city +absl::absl_log +absl::log_internal_log_impl +absl::log_internal_strip +absl::synchronization +absl::log_internal_message +absl::kernel_timeout_internal +absl::log_internal_conditions +absl::time +absl::graphcycles_internal +absl::symbolize +absl::stacktrace +absl::base +absl::debugging_internal +absl::int128 +absl::spinlock_wait absl::flags -absl::flat_hash_map -absl::flat_hash_set -absl::hash -absl::inlined_vector -absl::low_level_hash -absl::node_hash_map -absl::node_hash_set -absl::optional -absl::raw_hash_set absl::raw_logging_internal -absl::str_format -absl::str_format_internal -absl::bits -absl::fixed_array -absl::numeric_representation -absl::utility +absl::compare +absl::base_internal +absl::nullability +absl::flags_commandlineflag +absl::absl_vlog_is_on +absl::log_severity absl::type_traits -absl::string_view +absl::atomic_hook +absl::flags_commandlineflag_internal absl::core_headers -absl::nullability +absl::dynamic_annotations +absl::errno_saver +absl::absl_check +absl::str_format +absl::fixed_array +absl::hash +absl::flat_hash_map +absl::flat_hash_set +absl::log_internal_voidify +absl::log_internal_append_truncated +absl::log_internal_log_sink_set +absl::log_sink +absl::log_internal_format +absl::memory +absl::log_internal_proto +absl::log_sink_registry +absl::log_globals +absl::strerror +absl::log_internal_globals +absl::log_entry +absl::log_internal_nullguard +absl::examine_stack +absl::inlined_vector absl::span -absl::config -absl::synchronization -absl::base +absl::log_internal_nullstream +absl::vlog_config_internal +absl::flags_internal +absl::flags_reflection +absl::flags_config +absl::optional +absl::fast_type_id +absl::time_zone absl::civil_time -absl::debugging_internal -absl::demangle_internal -absl::graphcycles_internal -absl::int128 -absl::kernel_timeout_internal -absl::log_severity +absl::bits absl::malloc_internal -absl::spinlock_wait -absl::stacktrace -absl::string_view +absl::demangle_internal absl::strings -absl::strings_internal -absl::symbolize -absl::throw_delegate -absl::time -absl::time_zone) \ No newline at end of file +absl::config) \ No newline at end of file From a5523721cb716670b5ed06a9674fb76e6981ed55 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Jul 2024 23:18:24 +0000 Subject: [PATCH 08/28] update --- cmake/external/abseil-cpp.cmake | 61 +++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake index 2440b09a021d..1cfb04ed649e 100644 --- a/cmake/external/abseil-cpp.cmake +++ b/cmake/external/abseil-cpp.cmake @@ -54,64 +54,81 @@ absl::absl_log absl::log_internal_log_impl absl::log_internal_strip absl::synchronization +absl::flags absl::log_internal_message absl::kernel_timeout_internal -absl::log_internal_conditions +absl::hash +absl::absl_vlog_is_on +absl::flags_commandlineflag absl::time -absl::graphcycles_internal absl::symbolize +absl::log_internal_conditions +absl::strings +absl::graphcycles_internal absl::stacktrace absl::base +absl::strings_internal absl::debugging_internal absl::int128 absl::spinlock_wait -absl::flags absl::raw_logging_internal +absl::flat_hash_set +absl::flat_hash_map absl::compare absl::base_internal absl::nullability -absl::flags_commandlineflag -absl::absl_vlog_is_on absl::log_severity absl::type_traits absl::atomic_hook absl::flags_commandlineflag_internal +absl::hash_container_defaults absl::core_headers absl::dynamic_annotations absl::errno_saver absl::absl_check absl::str_format +absl::raw_hash_set +absl::hash_function_defaults +absl::container_memory +absl::raw_hash_map +absl::algorithm_container +absl::city +absl::low_level_hash +absl::variant +absl::function_ref +absl::meta absl::fixed_array -absl::hash -absl::flat_hash_map -absl::flat_hash_set +absl::utility absl::log_internal_voidify -absl::log_internal_append_truncated -absl::log_internal_log_sink_set -absl::log_sink -absl::log_internal_format -absl::memory +absl::strerror +absl::log_internal_nullguard absl::log_internal_proto -absl::log_sink_registry +absl::log_entry +absl::log_sink absl::log_globals -absl::strerror +absl::log_internal_log_sink_set absl::log_internal_globals -absl::log_entry -absl::log_internal_nullguard -absl::examine_stack +absl::log_internal_format +absl::log_internal_append_truncated +absl::log_sink_registry absl::inlined_vector +absl::examine_stack absl::span absl::log_internal_nullstream absl::vlog_config_internal -absl::flags_internal -absl::flags_reflection absl::flags_config +absl::flags_reflection +absl::flags_internal absl::optional absl::fast_type_id -absl::time_zone absl::civil_time +absl::time_zone +absl::charset +absl::memory +absl::string_view +absl::throw_delegate +absl::endian absl::bits absl::malloc_internal absl::demangle_internal -absl::strings absl::config) \ No newline at end of file From 0001e05c46a1a41c04baa53a2c74af6034885dfe Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Jul 2024 23:26:57 +0000 Subject: [PATCH 09/28] update --- cmake/external/abseil-cpp.cmake | 39 +++++++++++++++++---------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake index 1cfb04ed649e..caf4ed095649 100644 --- a/cmake/external/abseil-cpp.cmake +++ b/cmake/external/abseil-cpp.cmake @@ -62,11 +62,14 @@ absl::absl_vlog_is_on absl::flags_commandlineflag absl::time absl::symbolize +absl::graphcycles_internal absl::log_internal_conditions absl::strings -absl::graphcycles_internal +absl::malloc_internal +absl::optional absl::stacktrace absl::base +absl::bad_optional_access absl::strings_internal absl::debugging_internal absl::int128 @@ -92,43 +95,41 @@ absl::hash_function_defaults absl::container_memory absl::raw_hash_map absl::algorithm_container -absl::city +absl::fixed_array absl::low_level_hash absl::variant -absl::function_ref +absl::city absl::meta -absl::fixed_array -absl::utility +absl::function_ref absl::log_internal_voidify -absl::strerror absl::log_internal_nullguard -absl::log_internal_proto -absl::log_entry +absl::log_sink_registry +absl::strerror +absl::examine_stack absl::log_sink -absl::log_globals -absl::log_internal_log_sink_set -absl::log_internal_globals absl::log_internal_format +absl::log_entry +absl::log_internal_globals absl::log_internal_append_truncated -absl::log_sink_registry -absl::inlined_vector -absl::examine_stack +absl::log_internal_proto +absl::log_globals absl::span +absl::log_internal_log_sink_set +absl::inlined_vector absl::log_internal_nullstream absl::vlog_config_internal absl::flags_config absl::flags_reflection absl::flags_internal -absl::optional absl::fast_type_id -absl::civil_time +absl::utility absl::time_zone -absl::charset -absl::memory +absl::civil_time absl::string_view +absl::memory absl::throw_delegate +absl::charset absl::endian absl::bits -absl::malloc_internal absl::demangle_internal absl::config) \ No newline at end of file From 94b86c4276af129615b46e29d4cae87415d4267c Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Jul 2024 23:41:50 +0000 Subject: [PATCH 10/28] update --- cmake/external/abseil-cpp.cmake | 52 ++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake index caf4ed095649..8c56f4d2f76b 100644 --- a/cmake/external/abseil-cpp.cmake +++ b/cmake/external/abseil-cpp.cmake @@ -53,11 +53,16 @@ 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_message +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 @@ -77,6 +82,8 @@ absl::spinlock_wait absl::raw_logging_internal absl::flat_hash_set absl::flat_hash_map +absl::node_hash_map +absl::node_hash_set absl::compare absl::base_internal absl::nullability @@ -85,50 +92,49 @@ absl::type_traits absl::atomic_hook absl::flags_commandlineflag_internal absl::hash_container_defaults +absl::numeric_representation +absl::node_slot_policy absl::core_headers absl::dynamic_annotations absl::errno_saver absl::absl_check -absl::str_format -absl::raw_hash_set absl::hash_function_defaults -absl::container_memory -absl::raw_hash_map -absl::algorithm_container -absl::fixed_array -absl::low_level_hash -absl::variant absl::city -absl::meta +absl::low_level_hash absl::function_ref +absl::meta +absl::fixed_array +absl::variant absl::log_internal_voidify +absl::log_internal_proto absl::log_internal_nullguard +absl::log_globals +absl::inlined_vector +absl::log_sink absl::log_sink_registry +absl::log_entry absl::strerror +absl::log_internal_log_sink_set absl::examine_stack -absl::log_sink -absl::log_internal_format -absl::log_entry -absl::log_internal_globals -absl::log_internal_append_truncated -absl::log_internal_proto -absl::log_globals +absl::log_internal_config +absl::raw_hash_map +absl::algorithm_container +absl::container_memory +absl::raw_hash_set absl::span -absl::log_internal_log_sink_set -absl::inlined_vector absl::log_internal_nullstream absl::vlog_config_internal +absl::flags_internal absl::flags_config absl::flags_reflection -absl::flags_internal absl::fast_type_id absl::utility -absl::time_zone absl::civil_time -absl::string_view -absl::memory +absl::time_zone absl::throw_delegate absl::charset +absl::memory +absl::string_view absl::endian absl::bits absl::demangle_internal From 82b83e7278c896660d66c0e73e89d01a17fcf36b Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Fri, 19 Jul 2024 17:42:05 +0000 Subject: [PATCH 11/28] update --- cmake/external/abseil-cpp.cmake | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/cmake/external/abseil-cpp.cmake b/cmake/external/abseil-cpp.cmake index 8c56f4d2f76b..3223724693a4 100644 --- a/cmake/external/abseil-cpp.cmake +++ b/cmake/external/abseil-cpp.cmake @@ -71,14 +71,17 @@ 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::debugging_internal absl::int128 absl::spinlock_wait +absl::decode_rust_punycode absl::raw_logging_internal absl::flat_hash_set absl::flat_hash_map @@ -87,55 +90,56 @@ 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::function_ref -absl::meta absl::fixed_array absl::variant +absl::meta absl::log_internal_voidify -absl::log_internal_proto -absl::log_internal_nullguard -absl::log_globals -absl::inlined_vector absl::log_sink +absl::log_internal_log_sink_set absl::log_sink_registry absl::log_entry -absl::strerror -absl::log_internal_log_sink_set +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::algorithm_container -absl::container_memory absl::raw_hash_set +absl::container_memory +absl::algorithm_container absl::span absl::log_internal_nullstream absl::vlog_config_internal +absl::flags_reflection absl::flags_internal absl::flags_config -absl::flags_reflection absl::fast_type_id absl::utility -absl::civil_time absl::time_zone +absl::civil_time +absl::string_view absl::throw_delegate -absl::charset absl::memory -absl::string_view +absl::charset absl::endian -absl::bits -absl::demangle_internal absl::config) \ No newline at end of file From 23876724db489eeef02d72b40d6863a9381cf286 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 16:06:51 +0000 Subject: [PATCH 12/28] update --- tools/ci_build/github/azure-pipelines/linux-gpu-ci-pipeline.yml | 2 +- .../github/azure-pipelines/linux-gpu-tensorrt-ci-pipeline.yml | 2 +- .../github/azure-pipelines/stages/java-cuda-packaging-stage.yml | 2 +- .../stages/jobs/py-linux-cuda-package-test-job.yml | 2 +- .../github/azure-pipelines/stages/py-cuda-packaging-stage.yml | 2 +- .../linux/docker/Dockerfile.manylinux2_28_training_cuda12_2 | 2 +- .../linux/docker/inference/x86_64/default/cuda12/Dockerfile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/linux-gpu-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/linux-gpu-ci-pipeline.yml index 8890a9c4bf56..30f56f4b18ae 100644 --- a/tools/ci_build/github/azure-pipelines/linux-gpu-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/linux-gpu-ci-pipeline.yml @@ -50,7 +50,7 @@ variables: ${{ if eq(parameters.CudaVersion, '11.8') }}: value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20240531.1 ${{ if eq(parameters.CudaVersion, '12.2') }}: - value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1 + value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240719.1 - name: Repository ${{ if eq(parameters.CudaVersion, '11.8') }}: diff --git a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-ci-pipeline.yml index 3f9707ff5051..78e3b166995e 100644 --- a/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/linux-gpu-tensorrt-ci-pipeline.yml @@ -40,7 +40,7 @@ variables: ${{ if eq(parameters.CudaVersion, '11.8') }}: value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20240531.1 ${{ if eq(parameters.CudaVersion, '12.2') }}: - value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1 + value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240719.1 - name: linux_trt_version ${{ if eq(parameters.CudaVersion, '11.8') }}: value: 10.2.0.19-1.cuda11.8 diff --git a/tools/ci_build/github/azure-pipelines/stages/java-cuda-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/stages/java-cuda-packaging-stage.yml index 22264fc670cf..430dc89b5b09 100644 --- a/tools/ci_build/github/azure-pipelines/stages/java-cuda-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/java-cuda-packaging-stage.yml @@ -141,7 +141,7 @@ stages: ${{ if eq(parameters.CudaVersion, '11.8') }}: value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20240531.1 ${{ if eq(parameters.CudaVersion, '12.2') }}: - value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1 + value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240719.1 timeoutInMinutes: 60 steps: diff --git a/tools/ci_build/github/azure-pipelines/stages/jobs/py-linux-cuda-package-test-job.yml b/tools/ci_build/github/azure-pipelines/stages/jobs/py-linux-cuda-package-test-job.yml index 7dfafeb67acf..ad5e09e5a2f0 100644 --- a/tools/ci_build/github/azure-pipelines/stages/jobs/py-linux-cuda-package-test-job.yml +++ b/tools/ci_build/github/azure-pipelines/stages/jobs/py-linux-cuda-package-test-job.yml @@ -46,7 +46,7 @@ jobs: ${{ if eq(parameters.CudaVersion, '11.8') }}: value: nvidia/cuda:11.8.0-cudnn8-devel-ubi8 ${{ if eq(parameters.CudaVersion, '12.2') }}: - value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1 + value: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240719.1 - name: linux_trt_version ${{ if eq(parameters.CudaVersion, '11.8') }}: value: 10.2.0.19-1.cuda11.8 diff --git a/tools/ci_build/github/azure-pipelines/stages/py-cuda-packaging-stage.yml b/tools/ci_build/github/azure-pipelines/stages/py-cuda-packaging-stage.yml index dcd681bd4b91..098da375423d 100644 --- a/tools/ci_build/github/azure-pipelines/stages/py-cuda-packaging-stage.yml +++ b/tools/ci_build/github/azure-pipelines/stages/py-cuda-packaging-stage.yml @@ -81,5 +81,5 @@ stages: docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda11_x64_almalinux8_gcc11:20240531.1 trt_version: 10.2.0.19-1.cuda11.8 ${{ if eq(parameters.cuda_version, '12.2') }}: - docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1 + docker_base_image: onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240719.1 trt_version: 10.2.0.19-1.cuda12.5 diff --git a/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_training_cuda12_2 b/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_training_cuda12_2 index 6886600417c8..082446515a36 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_training_cuda12_2 +++ b/tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_training_cuda12_2 @@ -1,4 +1,4 @@ -FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240610.1 +FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12:20240719.1 ARG PYTHON_VERSION=3.9 ARG TORCH_VERSION=2.1.0 diff --git a/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/Dockerfile b/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/Dockerfile index ef69235ce5c1..245164f93fe4 100644 --- a/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/Dockerfile +++ b/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/Dockerfile @@ -2,7 +2,7 @@ # Licensed under the MIT License. # This file is used by Zip-Nuget Packaging NoContribOps Pipeline,Zip-Nuget-Java Packaging Pipeline -FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12_dotnet:20240610.1 +FROM onnxruntimebuildcache.azurecr.io/internal/azureml/onnxruntime/build/cuda12_x64_ubi8_gcc12_dotnet:20240719.1 ARG TRT_VERSION #Install TensorRT only if TRT_VERSION is not empty From ae67771b962e5018d4b5b716ca11299d5d4d252c Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 16:09:38 +0000 Subject: [PATCH 13/28] update --- tools/android_custom_build/Dockerfile | 2 +- .../docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6 | 2 +- .../linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 | 2 +- .../docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6 | 2 +- .../linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 | 2 +- .../github/linux/docker/Dockerfile.ubuntu_openvino | 4 ++-- .../github/linux/docker/Dockerfile.ubuntu_tensorrt_bin | 2 +- .../aarch64/default/cpu/scripts/install_deps.sh | 2 +- .../x86_64/default/cpu/scripts/install_deps.sh | 4 ++-- .../x86_64/default/cuda11/scripts/install_deps.sh | 4 ++-- .../x86_64/default/cuda12/scripts/install_deps.sh | 4 ++-- .../linux/docker/migraphx-ci-pipeline-env.Dockerfile | 4 ++-- .../github/linux/docker/scripts/install_os_deps.sh | 10 +++++----- .../github/pai/rocm-ci-pipeline-env.Dockerfile | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/android_custom_build/Dockerfile b/tools/android_custom_build/Dockerfile index 754a6633b0c6..50598a6d20df 100644 --- a/tools/android_custom_build/Dockerfile +++ b/tools/android_custom_build/Dockerfile @@ -24,7 +24,7 @@ RUN apt-get update && apt-get install --yes --no-install-recommends \ unzip lsb-release # cmake -RUN CMAKE_VERSION=3.27.3 && \ +RUN CMAKE_VERSION=3.30.1 && \ aria2c -q -d /tmp -o cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz \ --checksum=sha-256=62e7819fe0867658b6ea765a711686d637dce76cdf6eb0a6b0f1b879e0344fa7 \ https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-x86_64.tar.gz && \ diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6 index f1ffba3b3e1c..dfc057b129f9 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_8_tensorrt8_6 @@ -10,7 +10,7 @@ FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 AS base # The local directory into which to build and install CMAKE ARG ONNXRUNTIME_LOCAL_CODE_DIR=/code -ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.27.3-linux-x86_64/bin:/opt/miniconda/bin:${PATH} +ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.30.1-linux-x86_64/bin:/opt/miniconda/bin:${PATH} ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update &&\ diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 index 0bd56a1a5873..e24d225fa23f 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda11_tensorrt10 @@ -10,7 +10,7 @@ FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04 AS base # The local directory into which to build and install CMAKE ARG ONNXRUNTIME_LOCAL_CODE_DIR=/code -ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.27.3-linux-x86_64/bin:/opt/miniconda/bin:${PATH} +ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.30.1-linux-x86_64/bin:/opt/miniconda/bin:${PATH} ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update &&\ diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6 index 9493480784e8..f63112039fe8 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_3_tensorrt8_6 @@ -10,7 +10,7 @@ FROM nvidia/cuda:12.3.1-devel-ubuntu20.04 AS base # The local directory into which to build and install CMAKE ARG ONNXRUNTIME_LOCAL_CODE_DIR=/code -ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.27.3-linux-x86_64/bin:/opt/miniconda/bin:${PATH} +ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.30.1-linux-x86_64/bin:/opt/miniconda/bin:${PATH} ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update &&\ diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 index 7f66943dd874..da53b6419929 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_cuda12_tensorrt10 @@ -10,7 +10,7 @@ FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04 AS base # The local directory into which to build and install CMAKE ARG ONNXRUNTIME_LOCAL_CODE_DIR=/code -ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.27.3-linux-x86_64/bin:/opt/miniconda/bin:${PATH} +ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/src/tensorrt/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.30.1-linux-x86_64/bin:/opt/miniconda/bin:${PATH} ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update &&\ diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_openvino b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_openvino index dbd2076041b9..4382e12a1cd6 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_openvino +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_openvino @@ -34,8 +34,8 @@ RUN wget "https://github.com/intel/compute-runtime/releases/download/21.48.21782 sudo dpkg -i *.deb && rm -rf *.deb RUN mkdir -p /opt/cmake/bin && \ - wget https://github.com/Kitware/CMake/releases/download/v3.27.3/cmake-3.27.3-linux-x86_64.tar.gz && \ - tar -xf cmake-3.27.3-linux-x86_64.tar.gz --strip 1 -C /opt/cmake && rm -rf /cmake-3.27.3-linux-x86_64.tar.gz && \ + wget https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-linux-x86_64.tar.gz && \ + tar -xf cmake-3.30.1-linux-x86_64.tar.gz --strip 1 -C /opt/cmake && rm -rf /cmake-3.30.1-linux-x86_64.tar.gz && \ ln -sf /opt/cmake/bin/* /usr/bin ARG BUILD_UID=1000 diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin index 0281c1c8fef2..e8d8dc0a64fe 100644 --- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin +++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu_tensorrt_bin @@ -10,7 +10,7 @@ FROM nvidia/cuda:12.5.1-cudnn-devel-ubuntu20.04 AS base # The local directory into which to build and install CMAKE ARG ONNXRUNTIME_LOCAL_CODE_DIR=/code -ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.27.3-linux-x86_64/bin:/opt/miniconda/bin:${PATH} +ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${ONNXRUNTIME_LOCAL_CODE_DIR}/cmake-3.30.1-linux-x86_64/bin:/opt/miniconda/bin:${PATH} ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update &&\ diff --git a/tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/scripts/install_deps.sh b/tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/scripts/install_deps.sh index 7598ab0a7a53..9c3017240f77 100755 --- a/tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/scripts/install_deps.sh +++ b/tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/scripts/install_deps.sh @@ -40,7 +40,7 @@ cd /tmp/src CPU_ARCH=$(uname -m) echo "Installing cmake" -GetFile "https://github.com/Kitware/CMake/releases/download/v3.27.3/cmake-3.27.3-linux-$CPU_ARCH.tar.gz" "/tmp/src/cmake.tar.gz" +GetFile "https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-linux-$CPU_ARCH.tar.gz" "/tmp/src/cmake.tar.gz" tar -zxf /tmp/src/cmake.tar.gz --strip=1 -C /usr echo "Installing Ninja" diff --git a/tools/ci_build/github/linux/docker/inference/x86_64/default/cpu/scripts/install_deps.sh b/tools/ci_build/github/linux/docker/inference/x86_64/default/cpu/scripts/install_deps.sh index 3b05c6787ca3..fbbf4cf71157 100755 --- a/tools/ci_build/github/linux/docker/inference/x86_64/default/cpu/scripts/install_deps.sh +++ b/tools/ci_build/github/linux/docker/inference/x86_64/default/cpu/scripts/install_deps.sh @@ -39,8 +39,8 @@ mkdir -p /tmp/src cd /tmp/src echo "Installing cmake" -GetFile https://github.com/Kitware/CMake/releases/download/v3.27.3/cmake-3.27.3-linux-`uname -m`.tar.gz /tmp/src/cmake-3.27.3-linux-`uname -m`.tar.gz -tar -zxf /tmp/src/cmake-3.27.3-linux-`uname -m`.tar.gz --strip=1 -C /usr +GetFile https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-linux-`uname -m`.tar.gz /tmp/src/cmake-3.30.1-linux-`uname -m`.tar.gz +tar -zxf /tmp/src/cmake-3.30.1-linux-`uname -m`.tar.gz --strip=1 -C /usr echo "Installing Ninja" GetFile https://github.com/ninja-build/ninja/archive/v1.10.0.tar.gz /tmp/src/ninja-linux.tar.gz diff --git a/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda11/scripts/install_deps.sh b/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda11/scripts/install_deps.sh index 3c88c516bee4..fbbf4cf71157 100755 --- a/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda11/scripts/install_deps.sh +++ b/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda11/scripts/install_deps.sh @@ -39,8 +39,8 @@ mkdir -p /tmp/src cd /tmp/src echo "Installing cmake" -GetFile https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3-linux-`uname -m`.tar.gz /tmp/src/cmake-3.29.3-linux-`uname -m`.tar.gz -tar -zxf /tmp/src/cmake-3.29.3-linux-`uname -m`.tar.gz --strip=1 -C /usr +GetFile https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-linux-`uname -m`.tar.gz /tmp/src/cmake-3.30.1-linux-`uname -m`.tar.gz +tar -zxf /tmp/src/cmake-3.30.1-linux-`uname -m`.tar.gz --strip=1 -C /usr echo "Installing Ninja" GetFile https://github.com/ninja-build/ninja/archive/v1.10.0.tar.gz /tmp/src/ninja-linux.tar.gz diff --git a/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/scripts/install_deps.sh b/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/scripts/install_deps.sh index 3c88c516bee4..fbbf4cf71157 100755 --- a/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/scripts/install_deps.sh +++ b/tools/ci_build/github/linux/docker/inference/x86_64/default/cuda12/scripts/install_deps.sh @@ -39,8 +39,8 @@ mkdir -p /tmp/src cd /tmp/src echo "Installing cmake" -GetFile https://github.com/Kitware/CMake/releases/download/v3.29.3/cmake-3.29.3-linux-`uname -m`.tar.gz /tmp/src/cmake-3.29.3-linux-`uname -m`.tar.gz -tar -zxf /tmp/src/cmake-3.29.3-linux-`uname -m`.tar.gz --strip=1 -C /usr +GetFile https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-linux-`uname -m`.tar.gz /tmp/src/cmake-3.30.1-linux-`uname -m`.tar.gz +tar -zxf /tmp/src/cmake-3.30.1-linux-`uname -m`.tar.gz --strip=1 -C /usr echo "Installing Ninja" GetFile https://github.com/ninja-build/ninja/archive/v1.10.0.tar.gz /tmp/src/ninja-linux.tar.gz diff --git a/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile b/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile index 6c7163136882..98ea5e119c31 100644 --- a/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile +++ b/tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile @@ -45,10 +45,10 @@ ENV LANG C.UTF-8 WORKDIR /stage # Cmake -ENV CMAKE_VERSION=3.27.3 +ENV CMAKE_VERSION=3.30.1 RUN cd /usr/local && \ wget -q https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz && \ - tar -zxf /usr/local/cmake-3.27.3-Linux-x86_64.tar.gz --strip=1 -C /usr + tar -zxf /usr/local/cmake-3.30.1-Linux-x86_64.tar.gz --strip=1 -C /usr # ccache RUN mkdir -p /tmp/ccache && \ diff --git a/tools/ci_build/github/linux/docker/scripts/install_os_deps.sh b/tools/ci_build/github/linux/docker/scripts/install_os_deps.sh index 3e872d17504a..7f3160371aa2 100755 --- a/tools/ci_build/github/linux/docker/scripts/install_os_deps.sh +++ b/tools/ci_build/github/linux/docker/scripts/install_os_deps.sh @@ -71,18 +71,18 @@ if [[ $SYS_LONG_BIT = "64" && "$GLIBC_VERSION" -gt "9" ]]; then tar --strip 1 -xf /tmp/azcopy/azcopy.tar.gz -C /tmp/azcopy cp /tmp/azcopy/azcopy /usr/bin echo "Installing cmake" - GetFile https://github.com/Kitware/CMake/releases/download/v3.27.3/cmake-3.27.3-Linux-x86_64.tar.gz /tmp/src/cmake-3.27.3-Linux-x86_64.tar.gz - tar -zxf /tmp/src/cmake-3.27.3-Linux-x86_64.tar.gz --strip=1 -C /usr + GetFile https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1-Linux-x86_64.tar.gz /tmp/src/cmake-3.30.1-Linux-x86_64.tar.gz + tar -zxf /tmp/src/cmake-3.30.1-Linux-x86_64.tar.gz --strip=1 -C /usr echo "Installing Node.js" # The EOL for nodejs v18.17.1 LTS is April 2025 GetFile https://nodejs.org/dist/v18.17.1/node-v18.17.1-linux-x64.tar.xz /tmp/src/node-v18.17.1-linux-x64.tar.xz tar -xf /tmp/src/node-v18.17.1-linux-x64.tar.xz --strip=1 -C /usr else echo "Installing cmake" - GetFile https://github.com/Kitware/CMake/releases/download/v3.27.3/cmake-3.27.3.tar.gz /tmp/src/cmake-3.27.3.tar.gz - tar -xf /tmp/src/cmake-3.27.3.tar.gz -C /tmp/src + GetFile https://github.com/Kitware/CMake/releases/download/v3.30.1/cmake-3.30.1.tar.gz /tmp/src/cmake-3.30.1.tar.gz + tar -xf /tmp/src/cmake-3.30.1.tar.gz -C /tmp/src pushd . - cd /tmp/src/cmake-3.27.3 + cd /tmp/src/cmake-3.30.1 ./bootstrap --prefix=/usr --parallel=$(getconf _NPROCESSORS_ONLN) --system-bzip2 --system-curl --system-zlib --system-expat make -j$(getconf _NPROCESSORS_ONLN) make install diff --git a/tools/ci_build/github/pai/rocm-ci-pipeline-env.Dockerfile b/tools/ci_build/github/pai/rocm-ci-pipeline-env.Dockerfile index bf21a6531498..9272f6e627a1 100644 --- a/tools/ci_build/github/pai/rocm-ci-pipeline-env.Dockerfile +++ b/tools/ci_build/github/pai/rocm-ci-pipeline-env.Dockerfile @@ -41,7 +41,7 @@ ENV LANG C.UTF-8 WORKDIR /stage # CMake -ENV CMAKE_VERSION=3.27.3 +ENV CMAKE_VERSION=3.30.1 RUN cd /usr/local && \ wget -q -O - https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz | tar zxf - ENV PATH=/usr/local/cmake-${CMAKE_VERSION}-linux-x86_64/bin:${PATH} From 383eea9ed19d5d79984a0ee6467785628b444038 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 16:41:54 +0000 Subject: [PATCH 14/28] update --- onnxruntime/test/perftest/ort_test_session.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/test/perftest/ort_test_session.cc b/onnxruntime/test/perftest/ort_test_session.cc index 0e4f0d0cad3f..7b0ee1156c5d 100644 --- a/onnxruntime/test/perftest/ort_test_session.cc +++ b/onnxruntime/test/perftest/ort_test_session.cc @@ -823,7 +823,7 @@ select from 'TF8', 'TF16', 'UINT8', 'FLOAT', 'ITENSOR'. \n)"); std::ifstream file(performance_test_config.model_info.model_file_path.c_str(), std::ios::binary | std::ios::in | std::ios::ate); if (file.is_open()) { - const std::streamsize fsize = file.tellg(); + const std::streampos fsize = file.tellg(); file.seekg(0, std::ios_base::beg); std::vector model_bytes(narrow(fsize)); file.read(model_bytes.data(), fsize); From 1606221588e722d59e88bd30deb1cc7546436f96 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 17:15:18 +0000 Subject: [PATCH 15/28] update --- onnxruntime/test/perftest/ort_test_session.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/test/perftest/ort_test_session.cc b/onnxruntime/test/perftest/ort_test_session.cc index 7b0ee1156c5d..72b5da7aaec9 100644 --- a/onnxruntime/test/perftest/ort_test_session.cc +++ b/onnxruntime/test/perftest/ort_test_session.cc @@ -826,7 +826,7 @@ select from 'TF8', 'TF16', 'UINT8', 'FLOAT', 'ITENSOR'. \n)"); const std::streampos fsize = file.tellg(); file.seekg(0, std::ios_base::beg); std::vector model_bytes(narrow(fsize)); - file.read(model_bytes.data(), fsize); + file.read(model_bytes.data(), narrow(fsize)); session_ = Ort::Session(env, model_bytes.data(), model_bytes.size(), session_options); } else { ORT_THROW("Model file could not be opened.\n"); From c3fa68544a9f28e27659ca63848ca71a41590da1 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 18:22:14 +0000 Subject: [PATCH 16/28] update --- .../templates/c-api-linux-cpu.yml | 2 +- .../linux/build_tensorrt_c_api_package.sh | 4 +- .../github/linux/copy_strip_binary.sh | 39 ++++--------------- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml b/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml index 041ea623ecf6..e2b71c5c55fd 100644 --- a/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml +++ b/tools/ci_build/github/azure-pipelines/templates/c-api-linux-cpu.yml @@ -69,7 +69,7 @@ jobs: docker run --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build \ --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimecpubuildcentos8${{parameters.OnnxruntimeArch}} /bin/bash -c "python3.9 \ /onnxruntime_src/tools/ci_build/build.py --enable_lto --build_java --build_nodejs --build_dir /build --config Release \ - --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib ${{ parameters.AdditionalBuildFlags }} && cd /build/Release && make install DESTDIR=/build/linux-${{parameters.OnnxruntimeArch}}" + --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib ${{ parameters.AdditionalBuildFlags }} && cd /build/Release && make install DESTDIR=/build/installed" workingDirectory: $(Build.SourcesDirectory) displayName: 'Build' diff --git a/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh b/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh index cc63b68d441d..f46f39e4417b 100755 --- a/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh +++ b/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh @@ -3,6 +3,4 @@ set -e -x mkdir -p $HOME/.onnx docker run --rm --volume /data/onnx:/data/onnx:ro --volume $BUILD_SOURCESDIRECTORY:/onnxruntime_src --volume $BUILD_BINARIESDIRECTORY:/build \ --volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimecuda${CUDA_VERSION_MAJOR}xtrt86build \ -/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release \ ---skip_tests \ ---skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --build_java --build_nodejs --use_tensorrt --cuda_version=$CUDA_VERSION --cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr --tensorrt_home=/usr --cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' +/bin/bash -c "/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_tests --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --build_java --build_nodejs --use_tensorrt --cuda_version=$CUDA_VERSION --cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr --tensorrt_home=/usr --cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' && make install DESTDIR=/build/installed" diff --git a/tools/ci_build/github/linux/copy_strip_binary.sh b/tools/ci_build/github/linux/copy_strip_binary.sh index 65d6d97ebf0a..07bb5adf4dc0 100755 --- a/tools/ci_build/github/linux/copy_strip_binary.sh +++ b/tools/ci_build/github/linux/copy_strip_binary.sh @@ -16,22 +16,13 @@ done EXIT_CODE=1 uname -a -mkdir $BINARY_DIR/$ARTIFACT_NAME -mkdir $BINARY_DIR/$ARTIFACT_NAME/lib -mkdir $BINARY_DIR/$ARTIFACT_NAME/include -echo "Directories created" -cp $BINARY_DIR/$BUILD_CONFIG/$LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib -if [[ -f "$BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_cuda.so" ]]; then - cp $BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_shared.so $BINARY_DIR/$ARTIFACT_NAME/lib - cp $BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_cuda.so $BINARY_DIR/$ARTIFACT_NAME/lib -fi -if [[ -f "$BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_tensorrt.so" ]]; then - cp $BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_tensorrt.so $BINARY_DIR/$ARTIFACT_NAME/lib -fi -if [[ -f "$BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_rocm.so" ]]; then - cp $BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_shared.so $BINARY_DIR/$ARTIFACT_NAME/lib - cp $BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_rocm.so $BINARY_DIR/$ARTIFACT_NAME/lib -fi +cd "$BINARY_DIR" +mv installed/usr/local $ARTIFACT_NAME +mv $ARTIFACT_NAME/lib64 $ARTIFACT_NAME/lib +mv $ARTIFACT_NAME/include/onnxruntime/* $ARTIFACT_NAME/include +# Do not ship onnx_test_runner +rm -rf $ARTIFACT_NAME/bin +rmdir $ARTIFACT_NAME/include/onnxruntime echo "Copy debug symbols in a separate file and strip the original binary." if [[ $LIB_NAME == *.dylib ]] then @@ -40,22 +31,6 @@ then ln -s $LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib/libonnxruntime.dylib # copy the CoreML EP header for macOS build (libs with .dylib ext) cp $SOURCE_DIR/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h $BINARY_DIR/$ARTIFACT_NAME/include -elif [[ $LIB_NAME == *.so.* ]] -then - ln -s $LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib/libonnxruntime.so -fi -cp $SOURCE_DIR/include/onnxruntime/core/session/onnxruntime_*.h $BINARY_DIR/$ARTIFACT_NAME/include -cp $SOURCE_DIR/include/onnxruntime/core/framework/provider_options.h $BINARY_DIR/$ARTIFACT_NAME/include -cp $SOURCE_DIR/include/onnxruntime/core/providers/cpu/cpu_provider_factory.h $BINARY_DIR/$ARTIFACT_NAME/include -cp $SOURCE_DIR/orttraining/orttraining/training_api/include/onnxruntime_training_*.h $BINARY_DIR/$ARTIFACT_NAME/include - -if [[ -f "$BINARY_DIR/$BUILD_CONFIG/libonnxruntime_providers_cuda.so" ]]; then -# copy headers for context context used in custom ops -mkdir -p $BINARY_DIR/$ARTIFACT_NAME/include/core/providers/cuda -cp $SOURCE_DIR/include/onnxruntime/core/providers/custom_op_context.h $BINARY_DIR/$ARTIFACT_NAME/include/core/providers/custom_op_context.h -cp $SOURCE_DIR/include/onnxruntime/core/providers/resource.h $BINARY_DIR/$ARTIFACT_NAME/include/core/providers/resource.h -cp $SOURCE_DIR/include/onnxruntime/core/providers/cuda/cuda_context.h $BINARY_DIR/$ARTIFACT_NAME/include/core/providers/cuda/cuda_context.h -cp $SOURCE_DIR/include/onnxruntime/core/providers/cuda/cuda_resource.h $BINARY_DIR/$ARTIFACT_NAME/include/core/providers/cuda/cuda_resource.h fi # copy the README, licence and TPN From d976597b2e6b66bd55970101a524afd3bf7f8db2 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 18:58:13 +0000 Subject: [PATCH 17/28] update --- cmake/onnxruntime.cmake | 1 + cmake/onnxruntime_framework.cmake | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/onnxruntime.cmake b/cmake/onnxruntime.cmake index 0e89c2f14d34..bdb4b00b02a3 100644 --- a/cmake/onnxruntime.cmake +++ b/cmake/onnxruntime.cmake @@ -27,6 +27,7 @@ function(get_c_cxx_api_headers HEADERS_VAR) "${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_float16.h" "${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h" "${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h" + "${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_lite_custom_op.h" ) if (onnxruntime_ENABLE_TRAINING_APIS) diff --git a/cmake/onnxruntime_framework.cmake b/cmake/onnxruntime_framework.cmake index 43d16abd8fba..b85edbf37d44 100644 --- a/cmake/onnxruntime_framework.cmake +++ b/cmake/onnxruntime_framework.cmake @@ -123,7 +123,9 @@ if (WIN32) target_compile_definitions(onnxruntime_framework PRIVATE _SCL_SECURE_NO_WARNINGS) endif() -if (NOT onnxruntime_BUILD_SHARED_LIB) +if (onnxruntime_BUILD_SHARED_LIB) + install(FILES ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/framework/provider_options.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/) +else() install(DIRECTORY ${PROJECT_SOURCE_DIR}/../include/onnxruntime/core/framework DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/onnxruntime/core) install(TARGETS onnxruntime_framework ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} From 1d743012a6551fb77e6a2ece97ee12556c8ab7c6 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 20:45:11 +0000 Subject: [PATCH 18/28] update --- .../azure-pipelines/templates/mac-cpu-packaging-steps.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml index 7672b604a526..f2563e179473 100644 --- a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml +++ b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml @@ -46,8 +46,10 @@ steps: ChangeEveryCommit: true BuildStep: - script: | + set -e -x rm -rf $(Build.BinariesDirectory)/Release python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --update --build ${{ parameters.AdditionalBuildFlags }} --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release + make install DESTDIR=/build/installed displayName: 'Build ${{ parameters.MacosArch }}' env: CCACHE_DIR: ${{ parameters.CacheDir }} From f7eb4f21f2fdcfb9b7e8d302e510c82eba284ed7 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 22 Jul 2024 22:41:00 +0000 Subject: [PATCH 19/28] update --- .../azure-pipelines/templates/mac-cpu-packaging-steps.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml index f2563e179473..84f517a81686 100644 --- a/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml +++ b/tools/ci_build/github/azure-pipelines/templates/mac-cpu-packaging-steps.yml @@ -49,7 +49,8 @@ steps: set -e -x rm -rf $(Build.BinariesDirectory)/Release python3 $(Build.SourcesDirectory)/tools/ci_build/build.py --update --build ${{ parameters.AdditionalBuildFlags }} --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release - make install DESTDIR=/build/installed + cd $(Build.BinariesDirectory)/Release + make install DESTDIR=$(Build.BinariesDirectory)/installed displayName: 'Build ${{ parameters.MacosArch }}' env: CCACHE_DIR: ${{ parameters.CacheDir }} From 7da627532407950434b1be3947cee429afb4653a Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 00:24:03 +0000 Subject: [PATCH 20/28] update --- tools/ci_build/github/linux/copy_strip_binary.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/github/linux/copy_strip_binary.sh b/tools/ci_build/github/linux/copy_strip_binary.sh index 07bb5adf4dc0..515124789982 100755 --- a/tools/ci_build/github/linux/copy_strip_binary.sh +++ b/tools/ci_build/github/linux/copy_strip_binary.sh @@ -18,11 +18,10 @@ EXIT_CODE=1 uname -a cd "$BINARY_DIR" mv installed/usr/local $ARTIFACT_NAME -mv $ARTIFACT_NAME/lib64 $ARTIFACT_NAME/lib mv $ARTIFACT_NAME/include/onnxruntime/* $ARTIFACT_NAME/include +rmdir $ARTIFACT_NAME/include/onnxruntime # Do not ship onnx_test_runner rm -rf $ARTIFACT_NAME/bin -rmdir $ARTIFACT_NAME/include/onnxruntime echo "Copy debug symbols in a separate file and strip the original binary." if [[ $LIB_NAME == *.dylib ]] then @@ -31,6 +30,9 @@ then ln -s $LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib/libonnxruntime.dylib # copy the CoreML EP header for macOS build (libs with .dylib ext) cp $SOURCE_DIR/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h $BINARY_DIR/$ARTIFACT_NAME/include +else + # Linux + mv $ARTIFACT_NAME/lib64 $ARTIFACT_NAME/lib fi # copy the README, licence and TPN From 7f3f722d8c5ddf6ece2168e752b4dd438b53706f Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 05:10:37 +0000 Subject: [PATCH 21/28] update --- tools/ci_build/github/linux/copy_strip_binary.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/ci_build/github/linux/copy_strip_binary.sh b/tools/ci_build/github/linux/copy_strip_binary.sh index 515124789982..f5b4c38c85d4 100755 --- a/tools/ci_build/github/linux/copy_strip_binary.sh +++ b/tools/ci_build/github/linux/copy_strip_binary.sh @@ -27,7 +27,6 @@ if [[ $LIB_NAME == *.dylib ]] then dsymutil $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME -o $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME.dSYM strip -S $BINARY_DIR/$ARTIFACT_NAME/lib/$LIB_NAME - ln -s $LIB_NAME $BINARY_DIR/$ARTIFACT_NAME/lib/libonnxruntime.dylib # copy the CoreML EP header for macOS build (libs with .dylib ext) cp $SOURCE_DIR/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h $BINARY_DIR/$ARTIFACT_NAME/include else From 2e3ba29bd06b4c949331fe307f257902dc62a0c8 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 05:13:59 +0000 Subject: [PATCH 22/28] update --- tools/ci_build/github/linux/build_cuda_c_api_package.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/ci_build/github/linux/build_cuda_c_api_package.sh b/tools/ci_build/github/linux/build_cuda_c_api_package.sh index 04968aacdb25..29ce331e4f03 100755 --- a/tools/ci_build/github/linux/build_cuda_c_api_package.sh +++ b/tools/ci_build/github/linux/build_cuda_c_api_package.sh @@ -1,10 +1,5 @@ #!/bin/bash set -e -x docker run --rm --volume \ -$BUILD_SOURCESDIRECTORY:/onnxruntime_src --volume $BUILD_BINARIESDIRECTORY:/build \ ---volume /data/models:/build/models:ro --volume /data/onnx:/data/onnx:ro -e NIGHTLY_BUILD onnxruntimecuda${CUDA_VERSION_MAJOR}build \ -/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --enable_lto --build_java --build_nodejs --build_dir /build --config Release \ ---skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --use_cuda --cuda_version=$CUDA_VERSION \ ---cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr/local/cuda-$CUDA_VERSION \ ---skip_tests \ ---cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' +$BUILD_SOURCESDIRECTORY:/onnxruntime_src --volume $BUILD_BINARIESDIRECTORY:/build -e NIGHTLY_BUILD onnxruntimecuda${CUDA_VERSION_MAJOR}build \ +/bin/bash -c "/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --enable_lto --build_java --build_nodejs --build_dir /build --config Release --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --use_cuda --cuda_version=$CUDA_VERSION --cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr/local/cuda-$CUDA_VERSION --skip_tests --cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' && make install DESTDIR=/build/installed" From 7f8dc5e7aa3eee18788f69e5b76978537701451b Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 05:16:13 +0000 Subject: [PATCH 23/28] update --- tools/ci_build/github/linux/build_cuda_c_api_package.sh | 2 +- tools/ci_build/github/linux/build_tensorrt_c_api_package.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/github/linux/build_cuda_c_api_package.sh b/tools/ci_build/github/linux/build_cuda_c_api_package.sh index 29ce331e4f03..57a3bedc1e8e 100755 --- a/tools/ci_build/github/linux/build_cuda_c_api_package.sh +++ b/tools/ci_build/github/linux/build_cuda_c_api_package.sh @@ -2,4 +2,4 @@ set -e -x docker run --rm --volume \ $BUILD_SOURCESDIRECTORY:/onnxruntime_src --volume $BUILD_BINARIESDIRECTORY:/build -e NIGHTLY_BUILD onnxruntimecuda${CUDA_VERSION_MAJOR}build \ -/bin/bash -c "/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --enable_lto --build_java --build_nodejs --build_dir /build --config Release --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --use_cuda --cuda_version=$CUDA_VERSION --cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr/local/cuda-$CUDA_VERSION --skip_tests --cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' && make install DESTDIR=/build/installed" +/bin/bash -c "/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --enable_lto --build_java --build_nodejs --build_dir /build --config Release --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --use_cuda --cuda_version=$CUDA_VERSION --cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr/local/cuda-$CUDA_VERSION --skip_tests --cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' && cd /build/Release && make install DESTDIR=/build/installed" diff --git a/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh b/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh index f46f39e4417b..f0c9d51a5344 100755 --- a/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh +++ b/tools/ci_build/github/linux/build_tensorrt_c_api_package.sh @@ -3,4 +3,4 @@ set -e -x mkdir -p $HOME/.onnx docker run --rm --volume /data/onnx:/data/onnx:ro --volume $BUILD_SOURCESDIRECTORY:/onnxruntime_src --volume $BUILD_BINARIESDIRECTORY:/build \ --volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimecuda${CUDA_VERSION_MAJOR}xtrt86build \ -/bin/bash -c "/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_tests --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --build_java --build_nodejs --use_tensorrt --cuda_version=$CUDA_VERSION --cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr --tensorrt_home=/usr --cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' && make install DESTDIR=/build/installed" +/bin/bash -c "/usr/bin/python3.9 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_tests --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --build_java --build_nodejs --use_tensorrt --cuda_version=$CUDA_VERSION --cuda_home=/usr/local/cuda-$CUDA_VERSION --cudnn_home=/usr --tensorrt_home=/usr --cmake_extra_defines 'CMAKE_CUDA_ARCHITECTURES=60;61;70;75;80' && cd /build/Release && make install DESTDIR=/build/installed" From 0e44c0274a5c8b826098e1fbc2e89e85be345eb3 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 15:43:49 +0000 Subject: [PATCH 24/28] update --- .../Microsoft.ML.OnnxRuntime.Tests.iOS.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj index 56e65833724f..6b6ee269a9cf 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj @@ -89,7 +89,6 @@ - From 2942acd1f253a677503e876ed14c881f01041c88 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 09:20:36 -0700 Subject: [PATCH 25/28] update --- .../Microsoft.ML.OnnxRuntime.Tests.iOS.csproj | 1 - 1 file changed, 1 deletion(-) diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj index 6b6ee269a9cf..a58188a8262c 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj @@ -203,5 +203,4 @@ Microsoft.ML.OnnxRuntime.Tests.Devices - From b8226953348c2afa4712cc8031f3e92a99b55794 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 17:38:01 +0000 Subject: [PATCH 26/28] update --- onnxruntime/core/optimizer/graph_transformer_utils.cc | 4 ++-- .../github/azure-pipelines/templates/final-jar-testing.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/onnxruntime/core/optimizer/graph_transformer_utils.cc b/onnxruntime/core/optimizer/graph_transformer_utils.cc index 7da65f18ccac..ab1dbaea7b7f 100644 --- a/onnxruntime/core/optimizer/graph_transformer_utils.cc +++ b/onnxruntime/core/optimizer/graph_transformer_utils.cc @@ -189,7 +189,7 @@ InlinedVector> GenerateTransformers( const SessionOptions& session_options, const IExecutionProvider& cpu_execution_provider, /*required by constant folding*/ const InlinedHashSet& rules_and_transformers_to_disable, - concurrency::ThreadPool* intra_op_thread_pool) { + [[maybe_unused]] concurrency::ThreadPool* intra_op_thread_pool) { InlinedVector> transformers; const bool disable_quant_qdq = session_options.config_options.GetConfigOrDefault(kOrtSessionOptionsDisableQuantQDQ, "0") == "1"; @@ -419,7 +419,7 @@ InlinedVector> GenerateTransformersForMinimalB const SatApplyContextVariant& apply_context, const IExecutionProvider& cpu_execution_provider, const InlinedHashSet& rules_and_transformers_to_disable, - concurrency::ThreadPool* intra_op_thread_pool) { + [[maybe_unused]] concurrency::ThreadPool* intra_op_thread_pool) { InlinedVector> transformers; const bool saving = std::holds_alternative(apply_context); diff --git a/tools/ci_build/github/azure-pipelines/templates/final-jar-testing.yml b/tools/ci_build/github/azure-pipelines/templates/final-jar-testing.yml index c9b7c0114698..abc96601ffb6 100644 --- a/tools/ci_build/github/azure-pipelines/templates/final-jar-testing.yml +++ b/tools/ci_build/github/azure-pipelines/templates/final-jar-testing.yml @@ -68,8 +68,9 @@ stages: inputs: targetType: 'inline' script: | + set -e -x echo "Java Version" - java --version + java -version mkdir test pushd test jar xf '$(Build.BinariesDirectory)/final-jar/testing.jar' From 226fd4d6ec9d697e1f4d8308674c0058240bdc12 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 18:24:28 +0000 Subject: [PATCH 27/28] update --- .../Microsoft.ML.OnnxRuntime.Tests.iOS.csproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj index a58188a8262c..56e65833724f 100644 --- a/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj +++ b/csharp/test/Microsoft.ML.OnnxRuntime.Tests.iOS/Microsoft.ML.OnnxRuntime.Tests.iOS.csproj @@ -89,6 +89,7 @@ + @@ -203,4 +204,5 @@ Microsoft.ML.OnnxRuntime.Tests.Devices + From 31e80aeac4eac75903dedb7a07d7dc6fecb1ba89 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 23 Jul 2024 21:49:38 +0000 Subject: [PATCH 28/28] update --- tools/ci_build/github/linux/build_rocm_c_api_package.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tools/ci_build/github/linux/build_rocm_c_api_package.sh b/tools/ci_build/github/linux/build_rocm_c_api_package.sh index d70442ad2cae..9fee565170a1 100755 --- a/tools/ci_build/github/linux/build_rocm_c_api_package.sh +++ b/tools/ci_build/github/linux/build_rocm_c_api_package.sh @@ -31,14 +31,7 @@ docker run --rm \ --volume /data/onnx:/data/onnx:ro \ --workdir /onnxruntime_src \ $IMAGE \ - ${PYTHON_BIN:-python} /onnxruntime_src/tools/ci_build/build.py \ - --config Release \ - --build_dir /build \ - --parallel \ - --use_rocm --rocm_version=$ROCM_VERSION --rocm_home $ROCM_HOME --nccl_home $ROCM_HOME \ - --build_shared_lib \ - --skip_submodule_sync \ - --skip_tests --cmake_extra_defines FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER + /bin/bash -c "${PYTHON_BIN:-python} /onnxruntime_src/tools/ci_build/build.py --config Release --build_dir /build --parallel --use_rocm --use_binskim_compliant_compile_flags --rocm_version=$ROCM_VERSION --rocm_home $ROCM_HOME --nccl_home $ROCM_HOME --build_shared_lib --skip_submodule_sync --skip_tests --cmake_extra_defines FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER && cd /build/Release && make install DESTDIR=/build/installed" EXIT_CODE=$?