[CVS-188305] Add sxs manifest support for openvino.dll#1133
Open
n1harika wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
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.manifestthat describes the private assembly contents/version. - Add a Windows-only OpenVINO EP SxS isolation test and link
psapifor 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 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); | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.