From 5bde35d941c74c70e3fcf940120e06e1463dd070 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 10 Feb 2020 14:40:15 -0800 Subject: [PATCH 1/8] a --- cmake/CMakeLists.txt | 10 +- cmake/onnxruntime_common.cmake | 2 +- cmake/onnxruntime_unittests.cmake | 6 +- .../onnxruntime/core/graph/schema_registry.h | 3 +- include/onnxruntime/core/platform/ort_mutex.h | 118 +++++++++++++++--- .../core/framework/kernel_registry_manager.h | 2 +- .../core/framework/parallel_executor.h | 3 +- onnxruntime/core/framework/session_state.h | 4 +- onnxruntime/core/framework/utils.cc | 4 +- .../core/session/abi_session_options.cc | 1 + onnxruntime/core/session/custom_ops.cc | 2 +- onnxruntime/core/session/inference_session.cc | 3 +- .../core/session/inference_session_utils.h | 8 +- onnxruntime/test/framework/float_16_test.cc | 1 + .../test/framework/inference_session_test.cc | 2 +- onnxruntime/test/framework/op_kernel_test.cc | 1 + .../test/optimizer/graph_transform_test.cc | 1 + .../test/optimizer/nchwc_optimizer_test.cc | 1 + tools/ci_build/build.py | 2 - 19 files changed, 131 insertions(+), 43 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index d9094007e2121..1d5cfff41751f 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -56,7 +56,6 @@ option(onnxruntime_ENABLE_PYTHON "Enable python buildings" OFF) option(onnxruntime_ENABLE_MEMLEAK_CHECKER "Experimental: Enable memory leak checker in Windows debug build" OFF) option(onnxruntime_USE_CUDA "Build with CUDA support" OFF) option(onnxruntime_USE_OPENVINO "Build with OpenVINO support" OFF) -option(onnxruntime_USE_NSYNC "Build with NSYNC support. This option only takes effect on Linux" OFF) option(onnxruntime_USE_EIGEN_FOR_BLAS "Use eign for blas" ON) option(onnxruntime_USE_NNAPI "Build with DNNLibrary for Android NNAPI support" OFF) option(onnxruntime_USE_DNNL "Build with DNNL support" OFF) @@ -299,10 +298,9 @@ if(onnxruntime_BUILD_BENCHMARKS) endif() endif() -if(onnxruntime_USE_NSYNC) +if(NOT WIN32) add_subdirectory(${PROJECT_SOURCE_DIR}/external/nsync EXCLUDE_FROM_ALL) -endif() - +endif # External dependencies list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/external) @@ -817,9 +815,7 @@ if(WIN32) list(APPEND onnxruntime_EXTERNAL_LIBRARIES Shlwapi) list(APPEND onnxruntime_EXTERNAL_LIBRARIES debug Dbghelp) else() - if(onnxruntime_USE_NSYNC) - list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync_cpp) - endif() + list(APPEND onnxruntime_EXTERNAL_LIBRARIES nsync_cpp) list(APPEND onnxruntime_EXTERNAL_LIBRARIES ${CMAKE_DL_LIBS} Threads::Threads) endif() diff --git a/cmake/onnxruntime_common.cmake b/cmake/onnxruntime_common.cmake index 52aa2f3989d9d..bb99704a135f8 100644 --- a/cmake/onnxruntime_common.cmake +++ b/cmake/onnxruntime_common.cmake @@ -89,7 +89,7 @@ endif() onnxruntime_add_include_to_target(onnxruntime_common date_interface) target_include_directories(onnxruntime_common PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/external/nsync/public") -if(onnxruntime_USE_NSYNC) +if(NOT WIN32) target_compile_definitions(onnxruntime_common PUBLIC USE_NSYNC NSYNC_ATOMIC_CPP11) endif() diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 1592f26be2c37..2e7546c90f525 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -602,7 +602,7 @@ endif() if (onnxruntime_BUILD_SHARED_LIB) set(onnxruntime_perf_test_libs onnxruntime_test_utils onnx_test_runner_common onnxruntime_common re2::re2 onnx_test_data_proto onnx_proto ${PROTOBUF_LIB} ${GETOPT_LIB_WIDE} onnxruntime ${SYS_PATH_LIB} ${CMAKE_DL_LIBS}) - if(onnxruntime_USE_NSYNC) + if(NOT WIN32) list(APPEND onnxruntime_perf_test_libs nsync_cpp) endif() target_link_libraries(onnxruntime_perf_test PRIVATE ${onnxruntime_perf_test_libs} Threads::Threads) @@ -641,7 +641,7 @@ if (onnxruntime_BUILD_SHARED_LIB) # test inference using shared lib set(onnxruntime_shared_lib_test_LIBS onnxruntime_mocked_allocator onnxruntime_test_utils onnxruntime_common onnx_proto) - if(onnxruntime_USE_NSYNC) + if(NOT WIN32) list(APPEND onnxruntime_shared_lib_test_LIBS nsync_cpp) endif() AddTest(DYN @@ -669,7 +669,7 @@ if(MSVC) endif() target_include_directories(onnxruntime_mlas_test PRIVATE ${ONNXRUNTIME_ROOT}/core/mlas/inc ${ONNXRUNTIME_ROOT}) set(onnxruntime_mlas_test_libs onnxruntime_mlas onnxruntime_common) -if(onnxruntime_USE_NSYNC) +if(NOT WIN32) list(APPEND onnxruntime_mlas_test_libs nsync_cpp) endif() list(APPEND onnxruntime_mlas_test_libs Threads::Threads) diff --git a/include/onnxruntime/core/graph/schema_registry.h b/include/onnxruntime/core/graph/schema_registry.h index 9ca2acd42b186..f0754c82c7de8 100644 --- a/include/onnxruntime/core/graph/schema_registry.h +++ b/include/onnxruntime/core/graph/schema_registry.h @@ -5,9 +5,8 @@ #include "core/graph/constants.h" #include "core/common/common.h" #include "core/common/status.h" -#include "core/platform/ort_mutex.h" - #include "core/graph/onnx_protobuf.h" +#include "core/platform/ort_mutex.h" #include #include #include "sstream" diff --git a/include/onnxruntime/core/platform/ort_mutex.h b/include/onnxruntime/core/platform/ort_mutex.h index d8415b63499a9..8eacf1b8c4606 100644 --- a/include/onnxruntime/core/platform/ort_mutex.h +++ b/include/onnxruntime/core/platform/ort_mutex.h @@ -3,11 +3,103 @@ #pragma once #ifdef _WIN32 +#include #include -#include namespace onnxruntime { -using OrtMutex = std::mutex; -using OrtCondVar = std::condition_variable; +// Q: Why OrtMutex is better than std::mutex +// A: OrtMutex supports static initialization but std::mutex doesn't. Static initialization helps us prevent the "static +// initialization order problem". + +// Q: Why std::mutex can't make it? +// A: VC runtime has to support Windows XP at ABI level. But we don't have such requirement. + +// Q: Is OrtMutex faster than std::mutex? +// A: Sure + +class OrtMutex { + private: + SRWLOCK data_ = SRWLOCK_INIT; + + public: + constexpr OrtMutex() = default; + // SRW locks do not need to be explicitly destroyed. + ~OrtMutex() = default; + OrtMutex(const OrtMutex&) = delete; + OrtMutex& operator=(const OrtMutex&) = delete; + void lock() { AcquireSRWLockExclusive(native_handle()); } + bool try_lock() noexcept { return TryAcquireSRWLockExclusive(native_handle()) == TRUE; } + void unlock() noexcept { ReleaseSRWLockExclusive(native_handle()); } + using native_handle_type = SRWLOCK*; + + __forceinline native_handle_type native_handle() { return &data_; } +}; + +class OrtCondVar { + CONDITION_VARIABLE native_cv_object = CONDITION_VARIABLE_INIT; + + public: + constexpr OrtCondVar() noexcept = default; + ~OrtCondVar() = default; + + OrtCondVar(const OrtCondVar&) = delete; + OrtCondVar& operator=(const OrtCondVar&) = delete; + + void notify_one() noexcept { WakeConditionVariable(&native_cv_object); } + void notify_all() noexcept { WakeAllConditionVariable(&native_cv_object); } + + void wait(std::unique_lock& lk) { + if (SleepConditionVariableSRW(&native_cv_object, lk.mutex()->native_handle(), INFINITE, 0) != TRUE) { + std::terminate(); + } + } + template + void wait(std::unique_lock& __lk, _Predicate __pred); + + /** + * returns cv_status::timeout if the wait terminates when Rel_time has elapsed. Otherwise, the method returns + * cv_status::no_timeout. + * @param cond_mutex A unique_lock object. + * @param rel_time A chrono::duration object that specifies the amount of time before the thread wakes up. + * @return returns cv_status::timeout if the wait terminates when Rel_time has elapsed. Otherwise, the method returns + * cv_status::no_timeout + */ + template + std::cv_status wait_for(std::unique_lock& cond_mutex, const std::chrono::duration& rel_time); + using native_handle_type = CONDITION_VARIABLE*; + + native_handle_type native_handle() { return &native_cv_object; } + + private: + void timed_wait_impl(std::unique_lock& __lk, + std::chrono::time_point); +}; + +template +void OrtCondVar::wait(std::unique_lock& __lk, _Predicate __pred) { + while (!__pred()) wait(__lk); +} + +template +std::cv_status OrtCondVar::wait_for(std::unique_lock& cond_mutex, + const std::chrono::duration& rel_time) { + // TODO: is it possible to use nsync_from_time_point_ ? + using namespace std::chrono; + if (rel_time <= duration::zero()) + return std::cv_status::timeout; + using SystemTimePointFloat = time_point >; + using SystemTimePoint = time_point; + SystemTimePointFloat max_time = SystemTimePoint::max(); + steady_clock::time_point steady_now = steady_clock::now(); + system_clock::time_point system_now = system_clock::now(); + if (max_time - rel_time > system_now) { + nanoseconds remain = duration_cast(rel_time); + if (remain < rel_time) + ++remain; + timed_wait_impl(cond_mutex, system_now + remain); + } else + timed_wait_impl(cond_mutex, SystemTimePoint::max()); + return steady_clock::now() - steady_now < rel_time ? std::cv_status::no_timeout : std::cv_status::timeout; +} } // namespace onnxruntime #else #ifdef USE_NSYNC @@ -79,15 +171,15 @@ class OrtCondVar { void wait(std::unique_lock& __lk, _Predicate __pred); /** - * returns cv_status::timeout if the wait terminates when Rel_time has elapsed. Otherwise, the method returns cv_status::no_timeout. + * returns cv_status::timeout if the wait terminates when Rel_time has elapsed. Otherwise, the method returns + * cv_status::no_timeout. * @param cond_mutex A unique_lock object. * @param rel_time A chrono::duration object that specifies the amount of time before the thread wakes up. - * @return returns cv_status::timeout if the wait terminates when Rel_time has elapsed. Otherwise, the method returns cv_status::no_timeout + * @return returns cv_status::timeout if the wait terminates when Rel_time has elapsed. Otherwise, the method returns + * cv_status::no_timeout */ template - std::cv_status - wait_for(std::unique_lock& cond_mutex, - const std::chrono::duration& rel_time); + std::cv_status wait_for(std::unique_lock& cond_mutex, const std::chrono::duration& rel_time); #ifdef USE_NSYNC using native_handle_type = nsync::nsync_cv*; #else @@ -103,15 +195,13 @@ class OrtCondVar { template void OrtCondVar::wait(std::unique_lock& __lk, _Predicate __pred) { - while (!__pred()) - wait(__lk); + while (!__pred()) wait(__lk); } template -std::cv_status -OrtCondVar::wait_for(std::unique_lock& cond_mutex, - const std::chrono::duration& rel_time) { - //TODO: is it possible to use nsync_from_time_point_ ? +std::cv_status OrtCondVar::wait_for(std::unique_lock& cond_mutex, + const std::chrono::duration& rel_time) { + // TODO: is it possible to use nsync_from_time_point_ ? using namespace std::chrono; if (rel_time <= duration::zero()) return std::cv_status::timeout; diff --git a/onnxruntime/core/framework/kernel_registry_manager.h b/onnxruntime/core/framework/kernel_registry_manager.h index f09f8c37af1fe..ed972abb930d4 100644 --- a/onnxruntime/core/framework/kernel_registry_manager.h +++ b/onnxruntime/core/framework/kernel_registry_manager.h @@ -7,9 +7,9 @@ #include #include #include "core/common/status.h" -#include "core/platform/ort_mutex.h" #include "core/graph/graph_viewer.h" #include "core/framework/customregistry.h" +#include "core/platform/ort_mutex.h" namespace onnxruntime { struct KernelCreateInfo; diff --git a/onnxruntime/core/framework/parallel_executor.h b/onnxruntime/core/framework/parallel_executor.h index dc516b52baa64..799469f3531fe 100644 --- a/onnxruntime/core/framework/parallel_executor.h +++ b/onnxruntime/core/framework/parallel_executor.h @@ -4,16 +4,15 @@ #pragma once #include -#include #include "core/common/common.h" #include "core/common/status.h" #include "core/common/logging/logging.h" -#include "core/platform/ort_mutex.h" #include "core/framework/iexecutor.h" #include "core/framework/framework_common.h" #include "core/framework/ml_value.h" #include "core/framework/session_state.h" #include "core/graph/graph_viewer.h" +#include "core/platform/ort_mutex.h" namespace onnxruntime { diff --git a/onnxruntime/core/framework/session_state.h b/onnxruntime/core/framework/session_state.h index bff72c1d09945..6f49acb89fb77 100644 --- a/onnxruntime/core/framework/session_state.h +++ b/onnxruntime/core/framework/session_state.h @@ -8,8 +8,7 @@ #include #include #include "gsl/gsl" - -#include "core/platform/ort_mutex.h" +#include "core/graph/onnx_protobuf.h" #include "core/common/common.h" #include "core/common/logging/logging.h" #include "core/common/profiler.h" @@ -26,6 +25,7 @@ #include "core/graph/graph_viewer.h" #include "core/framework/fuse_nodes_funcs.h" #include "core/platform/threadpool.h" +#include "core/platform/ort_mutex.h" namespace onnxruntime { diff --git a/onnxruntime/core/framework/utils.cc b/onnxruntime/core/framework/utils.cc index 64b6007719867..5ffc381c6591f 100644 --- a/onnxruntime/core/framework/utils.cc +++ b/onnxruntime/core/framework/utils.cc @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - +#include "core/graph/onnx_protobuf.h" #include "core/framework/utils.h" #include + #include "core/graph/graph_viewer.h" #include "core/framework/data_transfer_manager.h" #include "core/framework/execution_frame.h" @@ -18,7 +19,6 @@ #include "core/framework/sequential_executor.h" #include "core/framework/tensorprotoutils.h" #include "core/mlas/inc/mlas.h" -#include "core/graph/onnx_protobuf.h" namespace ONNX_NAMESPACE { std::ostream& operator<<(std::ostream& out, const TensorShapeProto& shape_proto) { diff --git a/onnxruntime/core/session/abi_session_options.cc b/onnxruntime/core/session/abi_session_options.cc index d032e2dbd5469..c15252b71d5e5 100644 --- a/onnxruntime/core/session/abi_session_options.cc +++ b/onnxruntime/core/session/abi_session_options.cc @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/onnxruntime_c_api.h" #include "core/session/ort_apis.h" #include "core/framework/error_code_helper.h" diff --git a/onnxruntime/core/session/custom_ops.cc b/onnxruntime/core/session/custom_ops.cc index 919a398bbc1db..6f29cc2b83a8e 100644 --- a/onnxruntime/core/session/custom_ops.cc +++ b/onnxruntime/core/session/custom_ops.cc @@ -4,7 +4,7 @@ #ifdef _WIN32 #pragma warning(disable : 4267) #endif - +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include "core/session/ort_apis.h" #include "core/framework/customregistry.h" diff --git a/onnxruntime/core/session/inference_session.cc b/onnxruntime/core/session/inference_session.cc index 65d1eab7d6df6..8f46e9ee16f7b 100644 --- a/onnxruntime/core/session/inference_session.cc +++ b/onnxruntime/core/session/inference_session.cc @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include @@ -12,7 +13,6 @@ #include "core/common/logging/logging.h" #include "core/platform/notification.h" -#include "core/platform/ort_mutex.h" #include "core/platform/threadpool.h" #include "core/graph/graph_viewer.h" #include "core/graph/graph_utils.h" @@ -53,6 +53,7 @@ #include "core/optimizer/graph_transformer_utils.h" #include "core/util/thread_utils.h" #include "core/session/inference_session_utils.h" +#include "core/platform/ort_mutex.h" using namespace ONNX_NAMESPACE; diff --git a/onnxruntime/core/session/inference_session_utils.h b/onnxruntime/core/session/inference_session_utils.h index fce9b3881e070..571590836bbd1 100644 --- a/onnxruntime/core/session/inference_session_utils.h +++ b/onnxruntime/core/session/inference_session_utils.h @@ -2,7 +2,7 @@ // Licensed under the MIT License. #pragma once - +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include "core/framework/session_options.h" #include "core/common/common.h" @@ -14,9 +14,9 @@ namespace onnxruntime { namespace inference_session_utils { -static const std::string kOrtConfigKey = "ort_config"; -static const std::string kSessionOptionsKey = "session_options"; -static const std::string kOrtLoadConfigFromModelEnvVar = "ORT_LOAD_CONFIG_FROM_MODEL"; +static constexpr const char* kOrtConfigKey = "ort_config"; +static constexpr const char* kSessionOptionsKey = "session_options"; +static constexpr const char* kOrtLoadConfigFromModelEnvVar = "ORT_LOAD_CONFIG_FROM_MODEL"; } // namespace inference_session_utils diff --git a/onnxruntime/test/framework/float_16_test.cc b/onnxruntime/test/framework/float_16_test.cc index 2811f96ea2f44..f233e6862b2db 100644 --- a/onnxruntime/test/framework/float_16_test.cc +++ b/onnxruntime/test/framework/float_16_test.cc @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include diff --git a/onnxruntime/test/framework/inference_session_test.cc b/onnxruntime/test/framework/inference_session_test.cc index 9fb9136666067..8249f81d3a8dc 100644 --- a/onnxruntime/test/framework/inference_session_test.cc +++ b/onnxruntime/test/framework/inference_session_test.cc @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include diff --git a/onnxruntime/test/framework/op_kernel_test.cc b/onnxruntime/test/framework/op_kernel_test.cc index 707495b388da6..fb1a291979a0a 100644 --- a/onnxruntime/test/framework/op_kernel_test.cc +++ b/onnxruntime/test/framework/op_kernel_test.cc @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include "core/framework/op_kernel.h" diff --git a/onnxruntime/test/optimizer/graph_transform_test.cc b/onnxruntime/test/optimizer/graph_transform_test.cc index 12d59168e3278..f4bc9ce8f9d25 100644 --- a/onnxruntime/test/optimizer/graph_transform_test.cc +++ b/onnxruntime/test/optimizer/graph_transform_test.cc @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include "core/framework/data_types.h" diff --git a/onnxruntime/test/optimizer/nchwc_optimizer_test.cc b/onnxruntime/test/optimizer/nchwc_optimizer_test.cc index f8a33b29f6cef..0d51835df473a 100644 --- a/onnxruntime/test/optimizer/nchwc_optimizer_test.cc +++ b/onnxruntime/test/optimizer/nchwc_optimizer_test.cc @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include "core/graph/model.h" diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index ff9d032bc62cf..57ddfe325c502 100755 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -128,7 +128,6 @@ def parse_arguments(): parser.add_argument("--use_openvino", nargs="?", const="CPU_FP32", choices=["CPU_FP32","GPU_FP32","GPU_FP16","VAD-M_FP16","MYRIAD_FP16","VAD-F_FP32"], help="Build with OpenVINO for specific hardware.") parser.add_argument("--use_dnnlibrary", action='store_true', help="Build with DNNLibrary.") - parser.add_argument("--use_nsync", action='store_true', help="Build with NSYNC.") parser.add_argument("--use_preinstalled_eigen", action='store_true', help="Use pre-installed eigen.") parser.add_argument("--eigen_path", help="Path to pre-installed eigen.") parser.add_argument("--use_tvm", action="store_true", help="Build with tvm") @@ -292,7 +291,6 @@ def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home "-Donnxruntime_DEV_MODE=" + ("OFF" if args.android else "ON"), "-DPYTHON_EXECUTABLE=" + sys.executable, "-Donnxruntime_USE_CUDA=" + ("ON" if args.use_cuda else "OFF"), - "-Donnxruntime_USE_NSYNC=" + ("OFF" if is_windows() or not args.use_nsync else "ON"), "-Donnxruntime_CUDNN_HOME=" + (cudnn_home if args.use_cuda else ""), "-Donnxruntime_USE_FEATURIZERS=" + ("ON" if args.use_featurizers else "OFF"), "-Donnxruntime_CUDA_HOME=" + (cuda_home if args.use_cuda else ""), From 6912982aafb1e1713271ef7fd0fc7f963e30c4db Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 10 Feb 2020 14:49:24 -0800 Subject: [PATCH 2/8] a --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1d5cfff41751f..a999dcfdf76e5 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -300,7 +300,7 @@ endif() if(NOT WIN32) add_subdirectory(${PROJECT_SOURCE_DIR}/external/nsync EXCLUDE_FROM_ALL) -endif +endif() # External dependencies list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/external) From 90cb97313061cb2a1420fd1a00fba350a9dfcdc2 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 10 Feb 2020 15:38:12 -0800 Subject: [PATCH 3/8] a --- onnxruntime/test/framework/local_kernel_registry_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/onnxruntime/test/framework/local_kernel_registry_test.cc b/onnxruntime/test/framework/local_kernel_registry_test.cc index 19bb7d63e76ed..924d8c756b64a 100644 --- a/onnxruntime/test/framework/local_kernel_registry_test.cc +++ b/onnxruntime/test/framework/local_kernel_registry_test.cc @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" From ae9102b512d963155a1b0979a84f08ebcc5adfb7 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 10 Feb 2020 15:50:37 -0800 Subject: [PATCH 4/8] a --- onnxruntime/core/providers/dnnl/dnnl_execution_provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/dnnl/dnnl_execution_provider.h b/onnxruntime/core/providers/dnnl/dnnl_execution_provider.h index da5497b85ed87..a551a5dc66630 100644 --- a/onnxruntime/core/providers/dnnl/dnnl_execution_provider.h +++ b/onnxruntime/core/providers/dnnl/dnnl_execution_provider.h @@ -8,11 +8,11 @@ #include #include -#include "core/platform/ort_mutex.h" #include "core/graph/constants.h" #include "core/framework/allocatormgr.h" #include "core/framework/execution_provider.h" #include "core/providers/dnnl/subgraph/subgraph.h" +#include "core/platform/ort_mutex.h" namespace dnnl { struct memory; From d94262a993ab421dbd5a89406478b63cbfadd3fe Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 10 Feb 2020 16:48:56 -0800 Subject: [PATCH 5/8] a --- onnxruntime/core/providers/cuda/cuda_provider_factory.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/onnxruntime/core/providers/cuda/cuda_provider_factory.cc b/onnxruntime/core/providers/cuda/cuda_provider_factory.cc index 716716936d5c8..62b7fc99b0eae 100644 --- a/onnxruntime/core/providers/cuda/cuda_provider_factory.cc +++ b/onnxruntime/core/providers/cuda/cuda_provider_factory.cc @@ -3,6 +3,7 @@ #include "core/providers/cuda/cuda_provider_factory.h" #include +#include "core/graph/onnx_protobuf.h" #include "cuda_execution_provider.h" #include "core/session/abi_session_options_impl.h" From f0b6942c12eea9872b1e016141c18a35f2319081 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 10 Feb 2020 23:58:00 -0800 Subject: [PATCH 6/8] a --- onnxruntime/test/framework/cuda/fence_cuda_test.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/onnxruntime/test/framework/cuda/fence_cuda_test.cc b/onnxruntime/test/framework/cuda/fence_cuda_test.cc index c2c057a96402c..7328855c3c39d 100644 --- a/onnxruntime/test/framework/cuda/fence_cuda_test.cc +++ b/onnxruntime/test/framework/cuda/fence_cuda_test.cc @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" From 1291b0692660d0a0c794796c561b8fe88b438f4f Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 11 Feb 2020 00:02:06 -0800 Subject: [PATCH 7/8] a --- .../core/providers/tensorrt/tensorrt_execution_provider.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc index 1a56b8229e2c1..1f4608b7a75aa 100644 --- a/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc +++ b/onnxruntime/core/providers/tensorrt/tensorrt_execution_provider.cc @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#include "core/graph/onnx_protobuf.h" + #include "tensorrt_execution_provider.h" #include "core/providers/cuda/cuda_allocator.h" #include "core/providers/cuda/math/unary_elementwise_ops_impl.h" From 04d76c1339811d2bdf54f804664b287c6cbea16b Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 11 Feb 2020 01:33:51 -0800 Subject: [PATCH 8/8] a --- onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc b/onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc index 14e3fb283af8d..35d7d211738b1 100644 --- a/onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc +++ b/onnxruntime/test/providers/tensorrt/tensorrt_basic_test.cc @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - +#include "core/graph/onnx_protobuf.h" #include "core/session/inference_session.h" #include "test/providers/provider_test_utils.h" #include "test/framework/test_utils.h"