Skip to content

[CVS-188305] Add sxs manifest support for openvino.dll#1133

Open
n1harika wants to merge 4 commits into
ovep-developfrom
niharika/sxs_manifest
Open

[CVS-188305] Add sxs manifest support for openvino.dll#1133
n1harika wants to merge 4 commits into
ovep-developfrom
niharika/sxs_manifest

Conversation

@n1harika

Copy link
Copy Markdown

When two applications using OpenVINO are loaded in the same process (e.g., Realtek APO + Microsoft Voice Access), Windows loads openvino.dll only once — whichever loads first takes precedence. This causes DLL collisions reported by OEMs (Realtek, HP) and is blocking Microsoft from deploying the Voice Access feature on LNL/PTL platforms.

Solution:

Port the SxS (Side-by-Side) manifest changes from the Plugin EP to Legacy EP (https://github.com/intel-innersource/frameworks.ai.onnxruntime.openvino-plugin-ep/pull/293). SxS private-assembly manifests are embedded into all OpenVINO/TBB DLLs and onnxruntime_providers_openvino.dll at install time, ensuring Windows loads each EP's own private copy of OpenVINO regardless of what's already in the process.

This PR includes a test-

openvino_ep_sxs_isolation_test.cc — simulates a DLL collision scenario by loading a second copy of openvino.dll into the process, then initializes the OpenVINO EP and confirms that both copies coexist independently. Test runs from an installed build directory (cmake --install); skips otherwise.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Windows Side-by-Side (SxS) private-assembly manifest support for the legacy OpenVINO EP to prevent openvino.dll collisions when multiple OpenVINO-based components are loaded into the same process. It also adds a Windows-only unit test that simulates the collision scenario and validates that two distinct openvino.dll instances can coexist after EP initialization.

Changes:

  • Add install-time CMake scripting and manifest templates to embed SxS dependency manifests into OpenVINO/TBB DLLs and onnxruntime_providers_openvino.dll.
  • Generate and install openvino_runtime.manifest that describes the private assembly contents/version.
  • Add a Windows-only OpenVINO EP SxS isolation test and link psapi for module enumeration.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
onnxruntime/test/providers/openvino/openvino_ep_sxs_isolation_test.cc Adds a Windows-only test that preloads a second openvino.dll and verifies SxS loads the EP’s private copy independently.
cmake/sxs/embed_manifests.cmake Install-time script that uses mt.exe to extract/merge/embed RT_MANIFEST resources into DLLs.
cmake/sxs/dep.manifest.in Template for per-DLL dependency manifest referencing the openvino_runtime private assembly.
cmake/sxs/assembly.manifest.in Template for the openvino_runtime.manifest private assembly definition listing OpenVINO/TBB DLLs.
cmake/onnxruntime_unittests.cmake Links psapi on Windows OpenVINO builds to support the new module-enumeration test.
cmake/onnxruntime_providers_openvino.cmake Adds Windows install-time manifest generation, OpenVINO/TBB binary install, and manifest embedding via install(SCRIPT ...).

Comment thread onnxruntime/test/providers/openvino/openvino_ep_sxs_isolation_test.cc Outdated
Comment thread cmake/sxs/embed_manifests.cmake Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment on lines +315 to +320
if(DEFINED ORT_OV_TBB_INSTALL_FILES_wheel)
set(_staged_wheel "")
foreach(_src IN LISTS ORT_OV_TBB_INSTALL_FILES_wheel)
_ort_sxs_stage_file(_dst "$<CONFIG>" "${_src}")
list(APPEND _staged_wheel "${_dst}")
endforeach()
Comment on lines +121 to +124
// At this point we have 1 openvino.dll loaded (the fake pre-loaded one)
auto ov_mods_before = FindLoadedModules(L"openvino.dll");
ASSERT_GE(ov_mods_before.size(), 1u);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants