diff --git a/.github/workflows/linux_minimal_build.yml b/.github/workflows/linux_minimal_build.yml index 7d481475e7ded..1f78f56c412a7 100644 --- a/.github/workflows/linux_minimal_build.yml +++ b/.github/workflows/linux_minimal_build.yml @@ -530,43 +530,18 @@ jobs: --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF # Job 7: Extended minimal build with NNAPI EP for Android(arm64-v8a) and skip tests. - # NOTE: Keeping this as direct docker run due to custom volume mounts needed for Android SDK/NDK build_extended_minimal_android: name: 7. Build Extended Minimal (Android NNAPI) - needs: build_full_ort # Depends on Job 1 for test data runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU", "JobId=build_extended_minimal_android-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ] - permissions: # Permissions needed for build-docker-image - contents: read - packages: write - id-token: write # If using OIDC for ACR login steps: - name: Checkout repository uses: actions/checkout@v6 with: submodules: false - - uses: actions/setup-node@v6 - with: - node-version: 20 - - name: Download Test Data Artifact - uses: actions/download-artifact@v7 - with: - name: test_data - path: ${{ runner.temp }}/.test_data/ - - - name: Get Docker Image using Action - uses: microsoft/onnxruntime-github-actions/build-docker-image@v0.0.9 - id: build_docker_image_step - with: - dockerfile: ${{ github.workspace }}/tools/ci_build/github/linux/docker/inference/x86_64/default/cpu/Dockerfile - image-name: ghcr.io/microsoft/onnxruntime/onnxruntimecpubuildcix64 - push: true - azure-container-registry-name: onnxruntimebuildcache - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup Android NDK uses: ./.github/actions/setup-android-ndk @@ -574,43 +549,18 @@ jobs: ndk-version: 28.0.13004108 # Use default android-sdk-root if not specified - - name: Run Build 7 (Using docker run) + - name: Run Build 7 shell: bash run: | - # Create the target dir for build output inside the runner's temp dir first - mkdir -p ${{ runner.temp }}/7 - - # Ensure ANDROID_NDK_HOME is available and get its real path - if [ -z "$ANDROID_NDK_HOME" ]; then - echo "ANDROID_NDK_HOME is not set." - exit 1 - fi - NDK_HOME_REALPATH=$(realpath $ANDROID_NDK_HOME) - - # Ensure ANDROID_HOME is available - if [ -z "$ANDROID_HOME" ]; then - echo "ANDROID_HOME is not set. Using default /usr/local/lib/android/sdk" - export ANDROID_HOME=/usr/local/lib/android/sdk - fi - - docker run --rm \ - --volume ${{ env.BUILD_SOURCES_DIRECTORY }}:/onnxruntime_src \ - --volume ${{ runner.temp }}:/build \ - --volume $ANDROID_HOME:/android_home \ - --volume $NDK_HOME_REALPATH:/ndk_home \ - -e ALLOW_RELEASED_ONNX_OPSET_ONLY=1 \ - -e NIGHTLY_BUILD=1 -e RUNNER_TEMP=/build \ - ${{ steps.build_docker_image_step.outputs.full-image-name }} \ - bash -c "python3 -m pip install -r /onnxruntime_src/tools/ci_build/requirements/pybind/requirements.txt \ - && python3 /onnxruntime_src/tools/ci_build/build.py \ - --build_dir /build/7 \ + python3 ./tools/ci_build/build.py \ + --build_dir ./build.extended_minimal.nnapi \ --cmake_generator Ninja \ --config MinSizeRel \ --skip_submodule_sync \ --parallel --use_binskim_compliant_compile_flags \ --android \ - --android_sdk_path /android_home \ - --android_ndk_path /ndk_home \ + --android_sdk_path "$ANDROID_HOME" \ + --android_ndk_path "$ANDROID_NDK_HOME" \ --android_abi=arm64-v8a \ --android_api=29 \ --use_nnapi \ @@ -618,5 +568,5 @@ jobs: --build_shared_lib \ --disable_ml_ops \ --disable_exceptions \ - --skip_tests" + --skip_tests working-directory: ${{ env.BUILD_SOURCES_DIRECTORY }} diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 971741137cf4f..e05224647d6ad 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -21,11 +21,6 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "IntelLLVM") endif() endif() -# Needed for Java -if (NOT CMAKE_CXX_STANDARD) - set(CMAKE_C_STANDARD 99) -endif() - include(CheckCXXCompilerFlag) include(CheckLanguage) include(CMakeDependentOption) @@ -34,15 +29,6 @@ include(CheckFunctionExists) include(CheckSymbolExists) include(GNUInstallDirs) # onnxruntime_providers_* require CMAKE_INSTALL_* variables -if (NOT CMAKE_CXX_STANDARD) - # TODO: update this once all system adapt c++20 - if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") - set(CMAKE_CXX_STANDARD 20) - else() - set(CMAKE_CXX_STANDARD 17) - endif() -endif() - if (MSVC) # Make sure Visual Studio sets __cplusplus macro correctly: https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus") @@ -254,6 +240,37 @@ option(onnxruntime_USE_OPENVINO_INTERFACE "Build ONNXRuntime shared lib which is option(onnxruntime_USE_VITISAI_INTERFACE "Build ONNXRuntime shared lib which is compatible with Vitis-AI EP interface" OFF) option(onnxruntime_USE_QNN_INTERFACE "Build ONNXRuntime shared lib which is compatible with QNN EP interface" OFF) +# Set C/C++ standard versions +if (NOT CMAKE_C_STANDARD) + # Needed for Java + set(CMAKE_C_STANDARD 99) +endif() + +if (NOT CMAKE_CXX_STANDARD) + # TODO: enable C++20 for all builds + # set(CMAKE_CXX_STANDARD 20) + + if (onnxruntime_USE_CUDA) + # Known issues when updating from C++17 to C++20: + # - MSVC + onnxruntime_USE_CUDA: + # - Compilation error from CUTLASS header cute/tensor.hpp: + # cutlass-src\include\cute\stride.hpp(299,46): error C3545: 'Ints': parameter pack expects a non-type + # template argument + # - GCC + onnxruntime_USE_CUDA: + # - Compilation error from onnxruntime/contrib_ops/cuda/llm/cutlass_heuristic.cc when adding an element to + # `std::vector`: + # /opt/rh/gcc-toolset-14/root/usr/include/c++/14/bits/stl_construct.h:97:14: error: writing 1 byte into a + # region of size 0 [-Werror=stringop-overflow=] + # - Possibly a spurious warning + # + # When the CUDA EP becomes an independent plugin EP, hopefully we can update all of onnxruntime to C++20. + # We can keep building the CUDA plugin EP with C++17 if needed. + set(CMAKE_CXX_STANDARD 17) + else() + set(CMAKE_CXX_STANDARD 20) + endif() +endif() + if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS 11.1) message(FATAL_ERROR "GCC version must be greater than or equal to 11.1") endif() diff --git a/include/onnxruntime/core/common/logging/logging.h b/include/onnxruntime/core/common/logging/logging.h index dc930ce52eaa9..4e70f0414cb70 100644 --- a/include/onnxruntime/core/common/logging/logging.h +++ b/include/onnxruntime/core/common/logging/logging.h @@ -17,7 +17,6 @@ #include "core/common/logging/macros.h" #include "core/common/logging/severity.h" #include "core/common/logging/sink_types.h" -#include "date/date.h" /* @@ -56,43 +55,30 @@ struct OrtLogger; // opaque API type. is always an instance of Logger namespace onnxruntime { namespace logging { -using Timestamp = std::chrono::time_point; - -// C++20 has operator<< in std::chrono for Timestamp type but mac builds need additional checks -// to ensure usage is valid. -// TODO: As we enable C++20 on other platforms we may need similar checks. -// define a temporary value to determine whether to use the std::chrono or date implementation. -#define ORT_USE_CXX20_STD_CHRONO __cplusplus >= 202002L - -// Apply constraints for mac builds -#if __APPLE__ -#include - -// Catalyst check must be first as it has both TARGET_OS_MACCATALYST and TARGET_OS_MAC set -#if TARGET_OS_MACCATALYST -// maccatalyst requires version 16.3 -#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 160300) -#undef ORT_USE_CXX20_STD_CHRONO -#endif +// This class wraps `std::chrono::system_clock::time_point` and provides `operator<<`. +// It is a workaround for the inconsistent availability of `std::chrono::operator<<` for +// `std::chrono::system_clock::time_point`. +// When all builds support `std::chrono::operator<<`, we can simplify to this: +// `using Timestamp = std::chrono::system_clock::time_point;` +class Timestamp { + public: + using TimePoint = std::chrono::system_clock::time_point; + Timestamp(const TimePoint& time_point) noexcept : time_point_{time_point} {} -#elif TARGET_OS_MAC -// Xcode added support for C++20's std::chrono::operator<< in SDK version 14.4, -// but the target macOS version must also be >= 13.3 for it to be used. -#if (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED < 140400) || \ - (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 130300) -#undef ORT_USE_CXX20_STD_CHRONO -#endif + friend std::ostream& operator<<(std::ostream& os, const Timestamp& time_stamp) { + return time_stamp.WriteToStream(os); + } -#endif -#endif // __APPLE__ + friend std::wostream& operator<<(std::wostream& os, const Timestamp& time_stamp) { + return time_stamp.WriteToWStream(os); + } -#if ORT_USE_CXX20_STD_CHRONO -namespace timestamp_ns = std::chrono; -#else -namespace timestamp_ns = ::date; -#endif + private: + std::ostream& WriteToStream(std::ostream& os) const; + std::wostream& WriteToWStream(std::wostream& os) const; -#undef ORT_USE_CXX20_STD_CHRONO + TimePoint time_point_{}; +}; #ifndef NDEBUG ORT_ATTRIBUTE_UNUSED static bool vlog_enabled = true; // Set directly based on your needs. diff --git a/onnxruntime/core/common/logging/logging.cc b/onnxruntime/core/common/logging/logging.cc index a79e7300cffce..2f02199bde379 100644 --- a/onnxruntime/core/common/logging/logging.cc +++ b/onnxruntime/core/common/logging/logging.cc @@ -28,8 +28,53 @@ #include "logging.h" #endif +// C++20 has std::chrono::operator<< for std::chrono::system_clock::time_point but we need to check if usage is valid. +// define temporary macro ORT_USE_CXX20_STD_CHRONO to determine whether to use the std::chrono or date implementation. +#define ORT_USE_CXX20_STD_CHRONO __cpp_lib_chrono >= 201803L + +// Apply constraints for Apple builds +#if __APPLE__ +#include + +// iOS check must be first as it also has TARGET_OS_MAC set +#if TARGET_OS_IOS +// iOS requires version 16.3 +#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 160300) +#undef ORT_USE_CXX20_STD_CHRONO +#endif + +#elif TARGET_OS_MAC +// Xcode added support for C++20's std::chrono::operator<< in SDK version 14.4, +// but the target macOS version must also be >= 13.3 for it to be used. +#if (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED < 140400) || \ + (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 130300) +#undef ORT_USE_CXX20_STD_CHRONO +#endif + +#endif +#endif // __APPLE__ + +#if ORT_USE_CXX20_STD_CHRONO +namespace timestamp_stream_insertion_op_ns = std::chrono; +#else +#include "date/date.h" + +namespace timestamp_stream_insertion_op_ns = ::date; +#endif + +#undef ORT_USE_CXX20_STD_CHRONO + namespace onnxruntime { namespace logging { + +std::ostream& Timestamp::WriteToStream(std::ostream& os) const { + return timestamp_stream_insertion_op_ns::operator<<(os, time_point_); +} + +std::wostream& Timestamp::WriteToWStream(std::wostream& os) const { + return timestamp_stream_insertion_op_ns::operator<<(os, time_point_); +} + const char* Category::onnxruntime = "onnxruntime"; const char* Category::System = "System"; diff --git a/onnxruntime/core/common/logging/sinks/ostream_sink.cc b/onnxruntime/core/common/logging/sinks/ostream_sink.cc index 64441a2b20de2..1c4968502eabb 100644 --- a/onnxruntime/core/common/logging/sinks/ostream_sink.cc +++ b/onnxruntime/core/common/logging/sinks/ostream_sink.cc @@ -23,9 +23,6 @@ struct Color { #ifndef _WIN32 void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { - // operator for formatting of timestamp in ISO8601 format including microseconds - using timestamp_ns::operator<<; - // Two options as there may be multiple calls attempting to write to the same sink at once: // 1) Use mutex to synchronize access to the stream. // 2) Create the message in an ostringstream and output in one call. @@ -45,8 +42,7 @@ void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger } #endif - timestamp_ns::operator<<(msg, timestamp); // handle ambiguity with C++20 where date and std::chrono have operator<< - msg << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " << message.Location().ToString() << "] " << message.Message(); #ifndef ORT_MINIMAL_BUILD @@ -66,9 +62,6 @@ void OStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger } #else void WOStreamSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { - // operator for formatting of timestamp in ISO8601 format including microseconds - using date::operator<<; - // Two options as there may be multiple calls attempting to write to the same sink at once: // 1) Use mutex to synchronize access to the stream. // 2) Create the message in an ostringstream and output in one call. diff --git a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm index 6abbe76a7f151..862ea0bf3c825 100644 --- a/onnxruntime/core/platform/apple/logging/apple_log_sink.mm +++ b/onnxruntime/core/platform/apple/logging/apple_log_sink.mm @@ -11,11 +11,9 @@ namespace logging { void AppleLogSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { - using timestamp_ns::operator<<; std::ostringstream msg; - timestamp_ns::operator<<(msg, timestamp); // handle ambiguity with C++20 where date and std::chrono have operator<< - msg << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " + msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " << message.Location().ToString() << "] " << message.Message(); NSLog(@"%s", msg.str().c_str()); } diff --git a/onnxruntime/core/platform/posix/logging/syslog_sink.cc b/onnxruntime/core/platform/posix/logging/syslog_sink.cc index 9fbd26f093498..e5b60cf4742ef 100644 --- a/onnxruntime/core/platform/posix/logging/syslog_sink.cc +++ b/onnxruntime/core/platform/posix/logging/syslog_sink.cc @@ -4,7 +4,6 @@ #include "core/common/logging/logging.h" #include "core/common/logging/capture.h" #include "syslog_sink.h" -#include "date/date.h" namespace onnxruntime { namespace logging { @@ -12,7 +11,6 @@ namespace logging { constexpr const char* SYSLOG_LEVEL = "76432"; void SysLogSink::SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) { - using date::operator<<; std::stringstream msg; // syslog has it own timestamp but not as accurate as our timestamp. So we are going to keep both, diff --git a/onnxruntime/core/platform/windows/logging/etw_sink.h b/onnxruntime/core/platform/windows/logging/etw_sink.h index 62b762886ca82..d0c08a2144c20 100644 --- a/onnxruntime/core/platform/windows/logging/etw_sink.h +++ b/onnxruntime/core/platform/windows/logging/etw_sink.h @@ -16,7 +16,6 @@ #ifdef ETW_TRACE_LOGGING_SUPPORTED -#include #include #include #include diff --git a/onnxruntime/core/providers/vitisai/imp/global_api.cc b/onnxruntime/core/providers/vitisai/imp/global_api.cc index ec529c2ad1fc2..b74eb1cae4a16 100644 --- a/onnxruntime/core/providers/vitisai/imp/global_api.cc +++ b/onnxruntime/core/providers/vitisai/imp/global_api.cc @@ -238,7 +238,7 @@ vaip_core::DllSafe>> c if (s_library_vitisaiep.compile_onnx_model_vitisai_ep_v4) { Status status = Status::OK(); auto status_ptr = reinterpret_cast(&status); - auto ret = vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_vitisai_ep_v4(model_path.u8string(), graph_viewer.GetGraph(), options, status_ptr, change_status_with_error, logger), vaip_execution_provider_deletor); + auto ret = vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_vitisai_ep_v4(model_path.string(), graph_viewer.GetGraph(), options, status_ptr, change_status_with_error, logger), vaip_execution_provider_deletor); if (!status.IsOK()) { ORT_THROW(status); } @@ -246,7 +246,7 @@ vaip_core::DllSafe>> c } else if (s_library_vitisaiep.compile_onnx_model_vitisai_ep_v3) { Status status = Status::OK(); auto status_ptr = reinterpret_cast(&status); - auto ret = vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_vitisai_ep_v3(model_path.u8string(), graph_viewer.GetGraph(), options, status_ptr, change_status_with_error), vaip_execution_provider_deletor); + auto ret = vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_vitisai_ep_v3(model_path.string(), graph_viewer.GetGraph(), options, status_ptr, change_status_with_error), vaip_execution_provider_deletor); if (!status.IsOK()) { ORT_THROW(status); } @@ -254,13 +254,13 @@ vaip_core::DllSafe>> c } else if (s_library_vitisaiep.compile_onnx_model_vitisai_ep_with_error_handling) { Status status = Status::OK(); auto status_ptr = reinterpret_cast(&status); - auto ret = vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_vitisai_ep_with_error_handling(model_path.u8string(), graph_viewer.GetGraph(), options, status_ptr, change_status_with_error), vaip_execution_provider_deletor); + auto ret = vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_vitisai_ep_with_error_handling(model_path.string(), graph_viewer.GetGraph(), options, status_ptr, change_status_with_error), vaip_execution_provider_deletor); if (!status.IsOK()) { ORT_THROW(status); } return ret; } else { - return vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_with_options(model_path.u8string(), graph_viewer.GetGraph(), options), vaip_execution_provider_deletor); + return vaip_core::DllSafe(s_library_vitisaiep.compile_onnx_model_with_options(model_path.string(), graph_viewer.GetGraph(), options), vaip_execution_provider_deletor); } } @@ -707,4 +707,4 @@ CreateExecutionProviderFromAnotherEp(const std::string& lib, const OrtSessionOpt std::ignore = provider->CreateIExecutionProvider(nullptr, nullptr, 0, const_cast(provider_options), session_options, *((OrtLogger*)nullptr), ret); return ret; -} \ No newline at end of file +} diff --git a/onnxruntime/core/session/inference_session.cc b/onnxruntime/core/session/inference_session.cc index 0944be87591e2..863ea76e7aa3d 100644 --- a/onnxruntime/core/session/inference_session.cc +++ b/onnxruntime/core/session/inference_session.cc @@ -113,7 +113,7 @@ inline const wchar_t* GetDateFormatString() { return L"%Y-%m-%d_%H-%M-%S"; } #endif -// TODO: use LoggingManager::GetTimestamp and date::operator<< +// TODO: use LoggingManager::GetTimestamp and operator<< // (see ostream_sink.cc for an example) // to simplify this and match the log file timestamp format. template diff --git a/onnxruntime/core/session/utils.cc b/onnxruntime/core/session/utils.cc index a354cf26368d4..7ad09e1a2cd5e 100644 --- a/onnxruntime/core/session/utils.cc +++ b/onnxruntime/core/session/utils.cc @@ -549,7 +549,7 @@ Status LoadPluginOrProviderBridge(const std::string& registration_name, true, ProviderLibraryPathType::Absolute); bool is_provider_bridge = provider_library->Load() == Status::OK(); // library has GetProvider - LOGS_DEFAULT(INFO) << "Loading EP library: " << library_path + LOGS_DEFAULT(INFO) << "Loading EP library: " << resolved_library_path << (is_provider_bridge ? " as a provider bridge" : " as a plugin"); // create EpLibraryPlugin to ensure CreateEpFactories and ReleaseEpFactory are available diff --git a/onnxruntime/test/common/logging/helpers.h b/onnxruntime/test/common/logging/helpers.h index 0b623fe9ee09a..bf4d30184b7f6 100644 --- a/onnxruntime/test/common/logging/helpers.h +++ b/onnxruntime/test/common/logging/helpers.h @@ -39,8 +39,6 @@ class MockEtwSink : public ::onnxruntime::logging::ISink { #endif ACTION(PrintArgs) { - using onnxruntime::logging::timestamp_ns::operator<<; - // const Timestamp ×tamp, const std::string &logger_id, const Message &message // arg0 arg1 arg2 std::cout << arg1 << "@" << arg0 << " " diff --git a/onnxruntime/test/common/logging/logging_test.cc b/onnxruntime/test/common/logging/logging_test.cc index d3af022f83e86..8e1817e777d9e 100644 --- a/onnxruntime/test/common/logging/logging_test.cc +++ b/onnxruntime/test/common/logging/logging_test.cc @@ -14,8 +14,6 @@ #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(disable : 26400) #endif -// if we pull in the whole 'testing' namespace we get warnings from date.h as both use '_' in places. -// to avoid that we explicitly pull in the pieces we are using using testing::Eq; using testing::Field; using testing::Ge; diff --git a/onnxruntime/test/util/include/capturing_sink.h b/onnxruntime/test/util/include/capturing_sink.h index 39788947602df..37e1aecabdf25 100644 --- a/onnxruntime/test/util/include/capturing_sink.h +++ b/onnxruntime/test/util/include/capturing_sink.h @@ -6,8 +6,6 @@ #include "core/common/logging/logging.h" #include "core/common/logging/isink.h" -#include "date/date.h" - namespace onnxruntime { namespace test { @@ -16,8 +14,6 @@ using namespace ::onnxruntime::logging; class CapturingSink : public logging::ISink { public: void SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) override { - // operator for formatting of timestamp in ISO8601 format including microseconds - using date::operator<<; std::ostringstream msg; msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", " diff --git a/onnxruntime/test/util/include/test/capturing_sink.h b/onnxruntime/test/util/include/test/capturing_sink.h index 7d978d1bd1e56..37e1aecabdf25 100644 --- a/onnxruntime/test/util/include/test/capturing_sink.h +++ b/onnxruntime/test/util/include/test/capturing_sink.h @@ -14,8 +14,6 @@ using namespace ::onnxruntime::logging; class CapturingSink : public logging::ISink { public: void SendImpl(const Timestamp& timestamp, const std::string& logger_id, const Capture& message) override { - // operator for formatting of timestamp in ISO8601 format including microseconds - using timestamp_ns::operator<<; std::ostringstream msg; msg << timestamp << " [" << message.SeverityPrefix() << ":" << message.Category() << ":" << logger_id << ", "