Skip to content

Commit 88018fb

Browse files
committed
Merge remote-tracking branch 'origin/main' into fs-eire/string-template-prototype
2 parents 662f46a + a3c3e2f commit 88018fb

File tree

130 files changed

+4233
-2105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+4233
-2105
lines changed

cmake/onnxruntime.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ endif()
2222
function(get_c_cxx_api_headers HEADERS_VAR)
2323
set(_headers
2424
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_c_api.h"
25-
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_ep_c_api.h"
2625
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_cxx_api.h"
2726
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_cxx_inline.h"
27+
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_ep_c_api.h"
28+
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_ep_device_ep_metadata_keys.h"
2829
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_float16.h"
30+
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_lite_custom_op.h"
2931
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_run_options_config_keys.h"
3032
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_session_options_config_keys.h"
31-
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_lite_custom_op.h"
3233
)
3334

3435
if (onnxruntime_ENABLE_TRAINING_APIS)

cmake/onnxruntime_providers_openvino.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
endif()
3131

3232
list(APPEND OPENVINO_LIB_LIST openvino::frontend::onnx openvino::runtime ${PYTHON_LIBRARIES})
33-
if ((DEFINED ENV{OPENCL_LIBS}) AND (DEFINED ENV{OPENCL_INCS}) AND onnxruntime_USE_OPENVINO_GPU)
34-
add_definitions(-DIO_BUFFER_ENABLED=1)
35-
list(APPEND OPENVINO_LIB_LIST $ENV{OPENCL_LIBS})
36-
endif()
37-
3833
source_group(TREE ${ONNXRUNTIME_ROOT}/core FILES ${onnxruntime_providers_openvino_cc_srcs})
3934
onnxruntime_add_shared_library_module(onnxruntime_providers_openvino ${onnxruntime_providers_openvino_cc_srcs} "${ONNXRUNTIME_ROOT}/core/dll/onnxruntime.rc")
4035

cmake/onnxruntime_unittests.cmake

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,13 @@ if(onnxruntime_USE_AZURE)
767767
list(APPEND onnxruntime_test_providers_libs onnxruntime_providers_azure)
768768
endif()
769769

770+
if (onnxruntime_USE_OPENVINO)
771+
list(APPEND onnxruntime_test_framework_src_patterns ${TEST_SRC_DIR}/providers/openvino/*)
772+
list(APPEND onnxruntime_test_framework_libs onnxruntime_providers_openvino)
773+
list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_openvino)
774+
list(APPEND onnxruntime_test_providers_dependencies onnxruntime_providers_shared)
775+
endif()
776+
770777
file(GLOB onnxruntime_test_framework_src CONFIGURE_DEPENDS
771778
${onnxruntime_test_framework_src_patterns}
772779
)
@@ -1111,7 +1118,7 @@ if (NOT IOS)
11111118

11121119
target_link_libraries(onnx_test_runner PRIVATE onnx_test_runner_common ${GETOPT_LIB_WIDE} ${onnx_test_libs} nlohmann_json::nlohmann_json)
11131120
target_include_directories(onnx_test_runner PRIVATE ${ONNXRUNTIME_ROOT})
1114-
1121+
11151122
if (onnxruntime_ENABLE_TRAINING_TORCH_INTEROP)
11161123
target_link_libraries(onnx_test_runner PRIVATE Python::Python)
11171124
endif()
@@ -1232,7 +1239,7 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP)
12321239
target_include_directories(onnxruntime_perf_test PRIVATE ${onnx_test_runner_src_dir} ${ONNXRUNTIME_ROOT}
12331240
${onnxruntime_graph_header} ${onnxruntime_exec_src_dir}
12341241
${CMAKE_CURRENT_BINARY_DIR})
1235-
1242+
12361243
if (WIN32)
12371244
target_compile_options(onnxruntime_perf_test PRIVATE ${disabled_warnings})
12381245
if (NOT DEFINED SYS_PATH_LIB)
@@ -1338,7 +1345,7 @@ endif()
13381345
if (onnxruntime_USE_CUDA)
13391346
list(APPEND onnxruntime_shared_lib_test_LIBS)
13401347
endif()
1341-
1348+
13421349
if (onnxruntime_USE_TENSORRT)
13431350
list(APPEND onnxruntime_shared_lib_test_LIBS ${TENSORRT_LIBRARY_INFER})
13441351
endif()
@@ -1372,7 +1379,7 @@ endif()
13721379
if (onnxruntime_USE_NV)
13731380
target_include_directories(onnxruntime_shared_lib_test PRIVATE ${CUDAToolkit_INCLUDE_DIRS})
13741381
endif()
1375-
1382+
13761383

13771384
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
13781385
target_sources(onnxruntime_shared_lib_test PRIVATE
@@ -1429,7 +1436,7 @@ endif()
14291436
DEPENDS ${all_dependencies}
14301437
)
14311438

1432-
1439+
14331440

14341441
target_compile_definitions(onnxruntime_test_debug_node_inputs_outputs
14351442
PRIVATE DEBUG_NODE_INPUTS_OUTPUTS)
@@ -1983,6 +1990,11 @@ if (onnxruntime_BUILD_SHARED_LIB AND NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten"
19831990
LIBS ${onnxruntime_ep_graph_test_LIBS}
19841991
DEPENDS ${all_dependencies}
19851992
)
1993+
if (UNIX AND (onnxruntime_USE_TENSORRT OR onnxruntime_USE_NV))
1994+
# The test_main.cc includes NvInfer.h where it has many deprecated declarations
1995+
# simply ignore them for TensorRT EP build
1996+
set_property(TARGET onnxruntime_ep_graph_test APPEND_STRING PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations")
1997+
endif()
19861998
endif()
19871999

19882000
include(onnxruntime_fuzz_test.cmake)

include/onnxruntime/core/framework/allocator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Stream;
8686
namespace synchronize {
8787
class Notification;
8888
}
89-
using WaitNotificationFn = std::function<void(Stream&, synchronize::Notification&)>;
89+
using WaitNotificationFn = std::function<void(Stream*, synchronize::Notification&)>;
9090
void* AllocateBufferWithOptions(IAllocator& allocator, size_t size, bool use_reserve, Stream* stream, WaitNotificationFn wait_fn);
9191

9292
template <typename T>

include/onnxruntime/core/framework/stream_handles.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,16 @@ class IStreamCommandHandleRegistry {
172172
// i.e., for an cuda event what notify the memory copy, it could be wait on a CPU stream, or on another cuda stream.
173173
[[nodiscard]] virtual WaitNotificationFn GetWaitHandle(const OrtDevice& notification_owner_device,
174174
const OrtDevice& executor_device) const = 0;
175-
// Get the stream creation function registered on the given device type.
175+
176+
// Get the stream creation function registered for the given device type.
176177
[[nodiscard]] virtual CreateStreamFn GetCreateStreamFn(OrtDevice::DeviceType execution_device_type) const = 0;
177-
// register a wait methond which will be invoked when we wait a notification (created by 'notification_device_type' device) on a stream at 'device_type' device.
178+
179+
// register a wait method which will be invoked to await a notification that is
180+
// created by 'notification_device_type' device on a stream at 'device_type' device.
178181
virtual void RegisterWaitFn(OrtDevice::DeviceType notification_device_type,
179182
OrtDevice::DeviceType device_type,
180183
WaitNotificationFn fn) = 0;
184+
181185
// register a handle about how to create stream on given device type.
182186
virtual void RegisterCreateStreamFn(OrtDevice::DeviceType device_type, CreateStreamFn f) = 0;
183187

0 commit comments

Comments
 (0)